From: Grigori Goronzy Date: Sun, 17 Jul 2011 16:38:31 +0000 (+0200) Subject: Hack: return a valid face index even if no glyph is found X-Git-Tag: 0.10.0~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29638467c702fd528327da34cf6d96cf9dbf486a;p=libass Hack: return a valid face index even if no glyph is found Temporary fix for a crash when a font face doesn't actually contain the glyph that fontconfig reports. Needs a real solution. --- diff --git a/libass/ass_font.c b/libass/ass_font.c index 370623d..169de8d 100644 --- a/libass/ass_font.c +++ b/libass/ass_font.c @@ -487,6 +487,8 @@ int ass_font_get_index(void *fcpriv, ASS_Font *font, uint32_t symbol, } } #endif + // FIXME: make sure we have a valid face_index. this is a HACK. + *face_index = FFMAX(*face_index, 0); *glyph_index = index; return 1;