summaryrefslogtreecommitdiff
path: root/core/fpdftext/cpdf_textpagefind.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdftext/cpdf_textpagefind.cpp')
-rw-r--r--core/fpdftext/cpdf_textpagefind.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdftext/cpdf_textpagefind.cpp b/core/fpdftext/cpdf_textpagefind.cpp
index adef9f6c0c..3c8e532a7f 100644
--- a/core/fpdftext/cpdf_textpagefind.cpp
+++ b/core/fpdftext/cpdf_textpagefind.cpp
@@ -377,7 +377,7 @@ bool CPDF_TextPageFind::ExtractSubString(CFX_WideString& rString,
: (int)FXSYS_wcslen(lpszFullString);
ASSERT(nLen >= 0);
memcpy(rString.GetBuffer(nLen), lpszFullString, nLen * sizeof(wchar_t));
- rString.ReleaseBuffer();
+ rString.ReleaseBuffer(rString.GetStringLength());
return true;
}