summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/Document.cpp')
-rw-r--r--fpdfsdk/javascript/Document.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 762ba71cf2..75cd2ec251 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -784,8 +784,7 @@ FX_BOOL Document::info(IJS_Context* cc,
for (const auto& it : *pDictionary) {
const CFX_ByteString& bsKey = it.first;
CPDF_Object* pValueObj = it.second;
- CFX_WideString wsKey = CFX_WideString::FromUTF8(bsKey, bsKey.GetLength());
-
+ CFX_WideString wsKey = CFX_WideString::FromUTF8(bsKey.AsByteStringC());
if (pValueObj->IsString() || pValueObj->IsName()) {
FXJS_PutObjectString(isolate, pObj, wsKey.c_str(),
pValueObj->GetUnicodeText().c_str());