fixed segfault in new space detection code
authorMatthias Kramm <kramm@quiss.org>
Thu, 20 Aug 2009 18:57:02 +0000 (20:57 +0200)
committerMatthias Kramm <kramm@quiss.org>
Thu, 20 Aug 2009 18:57:02 +0000 (20:57 +0200)
lib/pdf/InfoOutputDev.cc

index affad69..fd9bf99 100644 (file)
@@ -106,7 +106,7 @@ static int findSpace(gfxfont_t*font)
                first_space = t;
        }
     }
                first_space = t;
        }
     }
-    if(GLYPH_IS_SPACE(&font->glyphs[32])) {
+    if(font->num_glyphs>32 && GLYPH_IS_SPACE(&font->glyphs[32])) {
        return 32;
     }
     return first_space;
        return 32;
     }
     return first_space;