From 000164d3bcc2e284c9e972655431a3562d037cd3 Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 7 Dec 2005 19:41:32 +0000 Subject: [PATCH] fixed text extraction if the font doesn't have a (working) glyph2ascii --- src/swfdump.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/swfdump.c b/src/swfdump.c index a74c453..5da07fc 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -275,8 +275,12 @@ void textcallback(void*self, int*glyphs, int*ypos, int nr, int fontid, int fonts if(glyphs[t] >= fonts[font]->numchars /*glyph is in range*/ || !fonts[font]->glyph2ascii /* font has ascii<->glyph mapping */ ) a = glyphs[t]; - else - a = fonts[font]->glyph2ascii[glyphs[t]]; + else { + if(fonts[font]->glyph2ascii[glyphs[t]]) + a = fonts[font]->glyph2ascii[glyphs[t]]; + else + a = glyphs[t]; + } } else { a = glyphs[t]; } -- 1.7.10.4