]> granicus.if.org Git - libass/commitdiff
ass_font: fix broken loop condition
authorwm4 <wm4@nowhere>
Thu, 24 Sep 2015 08:34:19 +0000 (10:34 +0200)
committerwm4 <wm4@nowhere>
Thu, 24 Sep 2015 08:34:34 +0000 (10:34 +0200)
As pointed out in #198. This is certainly just a typo.

Fixes #198.

libass/ass_font.c

index 7dd0e8cb3e4aa3ace6e05561b95c87aaed9cc278..0b924b5b4f1e839b1b3bf1726f2142950a34a726 100644 (file)
@@ -192,7 +192,7 @@ static int add_face(ASS_FontSelector *fontsel, ASS_Font *font, uint32_t ch)
             // The font provider gave us a post_script name and is not sure
             // about the face index.. so use the postscript name to find the
             // correct face_index in the collection!
-            for (int i = 0; face->num_faces; i++) {
+            for (int i = 0; i < face->num_faces; i++) {
                 FT_Done_Face(face);
                 error = FT_New_Face(font->ftlibrary, path, i, &face);
                 if (error) {