Index: core/fpdfdoc/doc_form.cpp |
diff --git a/core/fpdfdoc/doc_form.cpp b/core/fpdfdoc/doc_form.cpp |
index 2a6d7395493f96e9b0ebcea6e825090e47dd9ab0..aa4b5c9f3069e7c9667530317411714f7f33f547 100644 |
--- a/core/fpdfdoc/doc_form.cpp |
+++ b/core/fpdfdoc/doc_form.cpp |
@@ -343,8 +343,9 @@ CFX_ByteString CPDF_InterForm::GenerateNewResourceName( |
int num = 0; |
CFX_ByteString bsNum; |
while (TRUE) { |
- if (!pDict->KeyExist(csTmp + bsNum)) { |
- return csTmp + bsNum; |
+ CFX_ByteString csKey = csTmp + bsNum; |
+ if (!pDict->KeyExist(csKey.AsByteStringC())) { |
+ return csKey; |
} |
if (m < iCount) { |
csTmp += csStr[m++]; |