From 64a741ddab2fa84f32f5aa9d6bf08ce8d4ef23fe Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Sun, 11 Jul 2010 02:03:46 +0200 Subject: Fix match_fullname loop Let's loop over everything and not just the outline check. *sigh* Fixes a crash reported by lachs0r on IRC. --- libass/ass_fontconfig.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libass/ass_fontconfig.c b/libass/ass_fontconfig.c index dac2f05..15490d5 100644 --- a/libass/ass_fontconfig.c +++ b/libass/ass_fontconfig.c @@ -85,7 +85,7 @@ match_fullname(ASS_Library *lib, FCInstance *priv, const char *family, int pi = 0, at; FcBool ol; while (FcPatternGetString(pat, FC_FULLNAME, pi++, - (FcChar8 **) &fullname) == FcResultMatch) + (FcChar8 **) &fullname) == FcResultMatch) { if (FcPatternGetBool(pat, FC_OUTLINE, 0, &ol) != FcResultMatch || ol != FcTrue) continue; @@ -99,6 +99,7 @@ match_fullname(ASS_Library *lib, FCInstance *priv, const char *family, FcFontSetAdd(result, FcPatternDuplicate(pat)); break; } + } } } -- cgit v1.2.3