diff options
author | Bruce Dawson <brucedawson@google.com> | 2014-11-18 13:50:28 -0800 |
---|---|---|
committer | Bruce Dawson <brucedawson@google.com> | 2014-11-18 13:50:28 -0800 |
commit | 0d8b679fb2dbb3f4df9437f2a2b618e1eab1aa1b (patch) | |
tree | 9aefa185e91274d6f170bb208acf655f695065ab /core/src/fpdfapi/fpdf_parser | |
parent | f4aceedd4da965e62df5340a8f06c36d5fc3bbc1 (diff) | |
download | pdfium-0d8b679fb2dbb3f4df9437f2a2b618e1eab1aa1b.tar.xz |
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
R=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/731673003
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 2 |
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 5df4a6ff7f..029913458a 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -2536,7 +2536,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]; |