summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/doc_form.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/doc_form.cpp')
-rw-r--r--core/fpdfdoc/doc_form.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfdoc/doc_form.cpp b/core/fpdfdoc/doc_form.cpp
index 2a6d739549..aa4b5c9f30 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++];