Index: xfa/fxfa/fm2js/xfa_fm2jscontext.cpp |
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp |
index 351aedd669a1ee7dcc0527147786627a6840621e..c765ff25cdc142ada2a01fb070b2a2ba5658d4e9 100644 |
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp |
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp |
@@ -4238,14 +4238,12 @@ void CXFA_FM2JSContext::EncodeXML(const CFX_ByteStringC& szXMLString, |
} |
FX_BOOL CXFA_FM2JSContext::HTMLSTR2Code(const CFX_WideStringC& pData, |
uint32_t& iCode) { |
- int32_t iLength = pData.GetLength(); |
- uint32_t uHash = FX_HashCode_String_GetW(pData.c_str(), iLength); |
+ uint32_t uHash = FX_HashCode_GetW(pData, false); |
XFA_FMHtmlHashedReserveCode htmlhashedreservecode; |
- int32_t iStart = 0, |
- iEnd = (sizeof(reservesForDecode) / sizeof(reservesForDecode[0])) - 1; |
- int32_t iMid = (iStart + iEnd) / 2; |
+ int32_t iStart = 0; |
+ int32_t iEnd = (sizeof(reservesForDecode) / sizeof(reservesForDecode[0])) - 1; |
Lei Zhang
2016/04/23 01:33:29
FX_ArraySize() ?
Tom Sepez
2016/04/25 16:50:21
yup.
|
do { |
- iMid = (iStart + iEnd) / 2; |
+ int32_t iMid = (iStart + iEnd) / 2; |
htmlhashedreservecode = reservesForDecode[iMid]; |
if (uHash == htmlhashedreservecode.m_uHash) { |
iCode = htmlhashedreservecode.m_uCode; |