summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 42ed3fc3b4..6f09f92c60 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -315,13 +315,13 @@ void CPDF_StreamContentParser::AddNameParam(const CFX_ByteStringC& bsName) {
m_pDocument->GetByteStringPool(), PDF_NameDecode(bsName));
} else {
param.m_Type = ContentParam::NAME;
- if (bsName.Find('#') == FX_STRNPOS) {
- memcpy(param.m_Name.m_Buffer, bsName.raw_str(), bsName.GetLength());
- param.m_Name.m_Len = bsName.GetLength();
- } else {
+ if (bsName.Contains('#')) {
CFX_ByteString str = PDF_NameDecode(bsName);
memcpy(param.m_Name.m_Buffer, str.c_str(), str.GetLength());
param.m_Name.m_Len = str.GetLength();
+ } else {
+ memcpy(param.m_Name.m_Buffer, bsName.raw_str(), bsName.GetLength());
+ param.m_Name.m_Len = bsName.GetLength();
}
}
}