Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: core/src/fxcodec/jbig2/JBig2_Context.cpp

Issue 1405723003: Sanity check the values of TRUE and FALSE. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: address comments Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfdoc/doc_vt.cpp ('k') | core/src/fxge/dib/fx_dib_composite.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/jbig2/JBig2_Context.cpp
diff --git a/core/src/fxcodec/jbig2/JBig2_Context.cpp b/core/src/fxcodec/jbig2/JBig2_Context.cpp
index 06863b0bc49a2d69c26855a4ad4654c992054b59..d0f6995e3dfb2743aae7c5d0391ce4785d1beec5 100644
--- a/core/src/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_Context.cpp
@@ -381,7 +381,7 @@ int32_t CJBig2_Context::ProcessingParseSegmentData(CJBig2_Segment* pSegment,
m_pStream->readShortInteger(&wTemp) != 0) {
return JBIG2_ERROR_TOO_SHORT;
}
- pPageInfo->m_bIsStriped = ((wTemp >> 15) & 1) ? TRUE : FALSE;
+ pPageInfo->m_bIsStriped = !!(wTemp & 0x8000);
pPageInfo->m_wMaxStripeSize = wTemp & 0x7fff;
bool bMaxHeight = (pPageInfo->m_dwHeight == 0xffffffff);
if (bMaxHeight && pPageInfo->m_bIsStriped != TRUE)
« no previous file with comments | « core/src/fpdfdoc/doc_vt.cpp ('k') | core/src/fxge/dib/fx_dib_composite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698