summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2010-07-11 02:03:46 +0200
committerGrigori Goronzy <greg@blackbox>2010-07-11 02:07:12 +0200
commit64a741ddab2fa84f32f5aa9d6bf08ce8d4ef23fe (patch)
tree27637906ff383ce4b567d5c962dba4462cf736f5
parentcda83a0a6c9c0418e909ac0f27d735845dde85b3 (diff)
downloadlibass-64a741ddab2fa84f32f5aa9d6bf08ce8d4ef23fe.tar.bz2
libass-64a741ddab2fa84f32f5aa9d6bf08ce8d4ef23fe.tar.xz
Fix match_fullname loop
Let's loop over everything and not just the outline check. *sigh* Fixes a crash reported by lachs0r on IRC.
-rw-r--r--libass/ass_fontconfig.c3
1 files changed, 2 insertions, 1 deletions
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;
}
+ }
}
}