[poppler] [Patch] Silly infinite cycle

Marco Pesenti Gritti mpgritti at gmail.com
Sat Jun 18 02:51:34 PDT 2005


Really stupid bug.

Marco
-------------- next part --------------
Index: poppler/FontInfo.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/FontInfo.cc,v
retrieving revision 1.1
diff -u -r1.1 FontInfo.cc
--- poppler/FontInfo.cc	13 Jun 2005 17:18:32 -0000	1.1
+++ poppler/FontInfo.cc	18 Jun 2005 09:26:03 -0000
@@ -101,13 +101,14 @@
   }
   if (gfxFontDict) {
     for (i = 0; i < gfxFontDict->getNumFonts(); ++i) {
+      int k;
       if ((font = gfxFontDict->getFont(i))) {
         Ref fontRef = *font->getID();
 	GBool alreadySeen = gFalse;
 
         // check for an already-seen font
-        for (i = 0; i < fontsLen; ++i) {
-          if (fontRef.num == fonts[i].num && fontRef.gen == fonts[i].gen) {
+        for (k = 0; k < fontsLen; ++k) {
+          if (fontRef.num == fonts[k].num && fontRef.gen == fonts[k].gen) {
             alreadySeen = gTrue;
           }
         }


More information about the poppler mailing list