From 8d5d00b7270c198f9bfafcbd764ba0eff70fd5b1 Mon Sep 17 00:00:00 2001 From: weili Date: Mon, 12 Dec 2016 13:58:37 -0800 Subject: Fix JBig2 decoding logic While decoding among instances, variable "FIRSTS" should hold its value, not be reset. This was accidently changed by earlier refactoring. BUG=chromium:625848,pdfium:636 Review-Url: https://codereview.chromium.org/2569023002 --- core/fxcodec/jbig2/JBig2_TrdProc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/fxcodec/jbig2/JBig2_TrdProc.cpp b/core/fxcodec/jbig2/JBig2_TrdProc.cpp index 1329cde5f0..1fa4373d79 100644 --- a/core/fxcodec/jbig2/JBig2_TrdProc.cpp +++ b/core/fxcodec/jbig2/JBig2_TrdProc.cpp @@ -25,6 +25,7 @@ CJBig2_Image* CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream* pStream, STRIPT *= SBSTRIPS; STRIPT = -STRIPT; + int32_t FIRSTS = 0; uint32_t NINSTANCES = 0; while (NINSTANCES < SBNUMINSTANCES) { int32_t DT; @@ -34,7 +35,6 @@ CJBig2_Image* CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream* pStream, DT *= SBSTRIPS; STRIPT = STRIPT + DT; bool bFirst = true; - int32_t FIRSTS = 0; int32_t CURS = 0; for (;;) { if (bFirst) { -- cgit v1.2.3