]> granicus.if.org Git - libass/commitdiff
Fix off-by-one bug in font matching
authorGrigori Goronzy <greg@chown.ath.cx>
Thu, 18 Aug 2011 03:48:56 +0000 (05:48 +0200)
committerGrigori Goronzy <greg@chown.ath.cx>
Fri, 10 Jul 2015 08:42:40 +0000 (10:42 +0200)
libass/ass_fontselect.c

index ffc7047d9520de946254bea0d739d8ec0a31cd4d..01daa01ac2cbe70b8b9c13f32c4c8f2000270d5d 100644 (file)
@@ -340,7 +340,7 @@ static char *select_font(ASS_FontSelector *priv, ASS_Library *library,
             font_info_compare);
 
     // check glyph coverage
-    while (idx < priv->n_font) {
+    while (idx < priv->n_font - 1) {
         ASS_FontProvider *provider = font_infos[idx].provider;
         if (!provider || !provider->funcs.check_glyph) {
             idx++;