shithub: jbig2

Download patch

ref: 342ea4778d0ab98d8aabbaf62c2866afb804359d
parent: eb629c8ff915730ff737ca6e4d564cc88ddafb22
author: masaki <masaki@a1074d23-0009-0410-80fe-cf8c14f379e6>
date: Thu Apr 15 05:53:33 EDT 2010

A fix for 690094, "missing letters replaced by little vertical lines".

This problem was in jbig2dec function jbig2_decode_symbol_dict().
The image number was not incremented correctly when it built
symbol dictionary.
No difference expected, other than JBIG2 pdf files suffered by
this problem.

git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs/jbig2dec/@11074 a1074d23-0009-0410-80fe-cf8c14f379e6
(cherry picked from commit 75a5fa486571d0a9696976c290960f1bfdc7191b)

Signed-off-by: Masaki Ushizaka <masaki@ghostscript.com>

--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -705,13 +705,14 @@
         SDEXSYMS = NULL;
         break;
       }
-      for(k = 0; k < exrunlength; k++)
+      for(k = 0; k < exrunlength; k++) {
         if (exflag) {
           SDEXSYMS->glyphs[j++] = (i < m) ?
             jbig2_image_clone(ctx, params->SDINSYMS->glyphs[i]) :
             jbig2_image_clone(ctx, SDNEWSYMS->glyphs[i-m]);
-          i++;
         }
+        i++;
+      }
       exflag = !exflag;
     }
   }