Index: core/fpdfdoc/doc_form.cpp |
diff --git a/core/fpdfdoc/doc_form.cpp b/core/fpdfdoc/doc_form.cpp |
index 207b82454566d81eba98e8dd00a056ba172063c1..6ca40fdaf6c0ae7bf6b61c2b5c4c32c6f810bee4 100644 |
--- a/core/fpdfdoc/doc_form.cpp |
+++ b/core/fpdfdoc/doc_form.cpp |
@@ -633,11 +633,11 @@ FX_BOOL CPDF_InterForm::ValidateFieldName(const CPDF_FormControl* pControl, |
} |
int CPDF_InterForm::CompareFieldName(const CFX_ByteString& name1, |
const CFX_ByteString& name2) { |
- const FX_CHAR* ptr1 = name1; |
- const FX_CHAR* ptr2 = name2; |
if (name1.GetLength() == name2.GetLength()) { |
return name1 == name2 ? 1 : 0; |
} |
+ const FX_CHAR* ptr1 = name1.c_str(); |
+ const FX_CHAR* ptr2 = name2.c_str(); |
int i = 0; |
while (ptr1[i] == ptr2[i]) { |
i++; |