| Index: fpdfsdk/src/javascript/Document.cpp
|
| diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp
|
| index 9a434a5db720324aa36708cdf15a685f72c3455f..8e66c4d7971f834488395c0586d26c1cde4229ab 100644
|
| --- a/fpdfsdk/src/javascript/Document.cpp
|
| +++ b/fpdfsdk/src/javascript/Document.cpp
|
| @@ -800,10 +800,9 @@ FX_BOOL Document::info(IJS_Context* cc,
|
| FXJS_PutObjectString(isolate, pObj, L"Trapped", cwTrapped.c_str());
|
|
|
| // It's to be compatible to non-standard info dictionary.
|
| - FX_POSITION pos = pDictionary->GetStartPos();
|
| - while (pos) {
|
| - CFX_ByteString bsKey;
|
| - CPDF_Object* pValueObj = pDictionary->GetNextElement(pos, bsKey);
|
| + 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());
|
|
|
| if (pValueObj->IsString() || pValueObj->IsName()) {
|
|
|