From d4909516e699669d43cd9ebeab02d0d126fab851 Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 5 Sep 2004 15:57:57 +0000 Subject: [PATCH] fixed potential segfault. --- src/swfbbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/swfbbox.c b/src/swfbbox.c index b8facd0..f0017aa 100644 --- a/src/swfbbox.c +++ b/src/swfbbox.c @@ -240,8 +240,8 @@ static void textcallback(void*self, int*chars, int*xpos, int nr, int fontid, int SRECT newglyphbbox, glyphbbox = font->layout->bounds[chars[t]]; MATRIX m = bounds->m; - if(ch < font->numchars && font->glyph2ascii) { - ch = font->glyph2ascii[ch]; + if(chars[t] < font->numchars && font->glyph2ascii) { + ch = font->glyph2ascii[chars[t]]; } m.sx = (m.sx * fontsize) / 1024; -- 1.7.10.4