summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_render
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfapi/fpdf_render')
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
index f99f7cec38..0ea7ea1672 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -613,7 +613,7 @@ void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice, FX_FLOAT origi
FX_DWORD* pCharCodes;
FX_FLOAT* pCharPos;
if (nChars == 1) {
- charcode = pFont->GetNextChar(str, offset);
+ charcode = pFont->GetNextChar(str, str.GetLength(), offset);
pCharCodes = (FX_DWORD*)(FX_UINTPTR)charcode;
pCharPos = NULL;
} else {
@@ -621,7 +621,7 @@ void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice, FX_FLOAT origi
pCharPos = FX_Alloc(FX_FLOAT, nChars - 1);
FX_FLOAT cur_pos = 0;
for (int i = 0; i < nChars; i ++) {
- pCharCodes[i] = pFont->GetNextChar(str, offset);
+ pCharCodes[i] = pFont->GetNextChar(str, str.GetLength(), offset);
if (i) {
pCharPos[i - 1] = cur_pos;
}