summaryrefslogtreecommitdiff
path: root/core/src/fpdftext
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdftext')
-rw-r--r--core/src/fpdftext/fpdf_text.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp
index a4a124d5e6..d6d6de9a83 100644
--- a/core/src/fpdftext/fpdf_text.cpp
+++ b/core/src/fpdftext/fpdf_text.cpp
@@ -181,7 +181,7 @@ CTextBaseLine* CTextPage::InsertTextBox(CTextBaseLine* pBaseLine, FX_FLOAT basey
FX_LPCSTR pStr = str;
int len = str.GetLength(), offset = 0;
while (offset < len) {
- FX_DWORD ch = pFont->GetNextChar(pStr, offset);
+ FX_DWORD ch = pFont->GetNextChar(pStr, len, offset);
CFX_WideString unicode_str = pFont->UnicodeFromCharCode(ch);
if (unicode_str.IsEmpty()) {
text += (FX_WCHAR)ch;