Index: poppler/JBIG2Stream.cc =================================================================== RCS file: /cvs/poppler/poppler/poppler/JBIG2Stream.cc,v retrieving revision 1.9 diff -U5 -r1.9 JBIG2Stream.cc --- poppler/JBIG2Stream.cc 29 Apr 2006 15:23:41 -0000 1.9 +++ poppler/JBIG2Stream.cc 26 Oct 2006 06:28:49 -0000 @@ -3394,11 +3394,11 @@ iardxStats->reset(); iardyStats->reset(); iardwStats->reset(); iardhStats->reset(); iariStats->reset(); - if (iaidStats->getContextSize() == symCodeLen + 1) { + if (iaidStats->getContextSize() == (1 << (symCodeLen + 1))) { iaidStats->reset(); } else { delete iaidStats; iaidStats = new JArithmeticDecoderStats(1 << (symCodeLen + 1)); }