]> granicus.if.org Git - libass/commitdiff
Fix match_fullname loop
authorGrigori Goronzy <greg@blackbox>
Sun, 11 Jul 2010 00:03:46 +0000 (02:03 +0200)
committerGrigori Goronzy <greg@blackbox>
Sun, 11 Jul 2010 00:07:12 +0000 (02:07 +0200)
Let's loop over everything and not just the outline check. *sigh*
Fixes a crash reported by lachs0r on IRC.

libass/ass_fontconfig.c

index dac2f0549cab5ca86eebff54cfd3bfe8c6569e51..15490d5faa7d5b71d25dc86f4623f28843b88fc6 100644 (file)
@@ -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;
                 }
+            }
         }
     }