summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp')
-rw-r--r--core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
index 466ccaffa5..03975149b0 100644
--- a/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
+++ b/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
@@ -89,9 +89,9 @@ int32_t GetDirectInteger(CPDF_Dictionary* pDict, const CFX_ByteStringC& key) {
CFX_ByteString PDF_NameDecode(const CFX_ByteStringC& bstr) {
int size = bstr.GetLength();
const FX_CHAR* pSrc = bstr.c_str();
- if (!FXSYS_memchr(pSrc, '#', size)) {
+ if (bstr.Find('#') == -1)
return bstr;
- }
+
CFX_ByteString result;
FX_CHAR* pDestStart = result.GetBuffer(size);
FX_CHAR* pDest = pDestStart;
@@ -109,9 +109,8 @@ CFX_ByteString PDF_NameDecode(const CFX_ByteStringC& bstr) {
}
CFX_ByteString PDF_NameDecode(const CFX_ByteString& orig) {
- if (!FXSYS_memchr(orig.c_str(), '#', orig.GetLength())) {
+ if (orig.Find('#') == -1)
return orig;
- }
return PDF_NameDecode(orig.AsStringC());
}