summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorBruce Dawson <brucedawson@google.com>2014-12-23 12:00:44 -0800
committerBruce Dawson <brucedawson@google.com>2014-12-23 12:00:44 -0800
commit1be4117d0ea336203680c64d9d0a1ae1d5a6cf61 (patch)
tree8fec13a75bcafcb697dec7764bd381764ae8de6a /core/src
parentcf8e1b281f0ece4c23568aa9a01f259aa84836f1 (diff)
downloadpdfium-1be4117d0ea336203680c64d9d0a1ae1d5a6cf61.tar.xz
XFA: merge patch from CL 731673003, fix incorrect operator
Fixing operator so that bCheckRight isn't always true. Unknown effect! VC++'s /analyze points out that this expression: FX_BOOL bCheckRight = type != 'D' || type != 'W';" is always true. This means that the tests for the right edge of a word Original patch from Bruce Dawson(brucedawson@chromium.org) BUG=427616 TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/822763003
Diffstat (limited to 'core/src')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index 0397971c95..f650b771ec 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -2532,7 +2532,7 @@ FX_BOOL CPDF_SyntaxParser::IsWholeWord(FX_FILESIZE startpos, FX_FILESIZE limit,
FX_BYTE type = _PDF_CharType[tag[0]];
FX_BOOL bCheckLeft = type != 'D' && type != 'W';
type = _PDF_CharType[tag[taglen - 1]];
- FX_BOOL bCheckRight = type != 'D' || type != 'W';
+ FX_BOOL bCheckRight = type != 'D' && type != 'W';
FX_BYTE ch;
if (bCheckRight && startpos + (FX_INT32)taglen <= limit && GetCharAt(startpos + (FX_INT32)taglen, ch)) {
FX_BYTE type = _PDF_CharType[ch];