Index: core/fpdftext/fpdf_text_int.cpp |
diff --git a/core/fpdftext/fpdf_text_int.cpp b/core/fpdftext/fpdf_text_int.cpp |
index 8d8fa4e9ed87eb321b2042a88c853e1376f863e9..a1e3fda7b1784106ed524901fa09410cdeddb41c 100644 |
--- a/core/fpdftext/fpdf_text_int.cpp |
+++ b/core/fpdftext/fpdf_text_int.cpp |
@@ -906,7 +906,7 @@ int CPDF_TextPage::GetCharWidth(uint32_t charCode, CPDF_Font* pFont) const { |
CFX_ByteString str; |
pFont->AppendChar(str, charCode); |
- if (int w = pFont->GetStringWidth(str, 1)) |
+ if (int w = pFont->GetStringWidth(str.c_str(), 1)) |
return w; |
return pFont->GetCharBBox(charCode).Width(); |