summaryrefslogtreecommitdiff
path: root/core/fpdftext/cpdf_textpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdftext/cpdf_textpage.cpp')
-rw-r--r--core/fpdftext/cpdf_textpage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index e2d1f5f0a6..91c92492cd 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -610,7 +610,7 @@ uint32_t CPDF_TextPage::GetCharWidth(uint32_t charCode,
ByteString str;
pFont->AppendChar(&str, charCode);
- w = pFont->GetStringWidth(str.c_str(), 1);
+ w = pFont->GetStringWidth(str.AsStringView());
if (w > 0)
return w;