diff options
author | Grigori Goronzy <greg@blackbox> | 2011-07-17 18:38:31 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2011-07-17 18:38:31 +0200 |
commit | 29638467c702fd528327da34cf6d96cf9dbf486a (patch) | |
tree | 0bdd6f0b03635b44618ecca73c22ad2005764300 | |
parent | 0b709a5df697b36a24e4456b24585ec8f0c54b63 (diff) | |
download | libass-29638467c702fd528327da34cf6d96cf9dbf486a.tar.bz2 libass-29638467c702fd528327da34cf6d96cf9dbf486a.tar.xz |
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.
-rw-r--r-- | libass/ass_font.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |