diff libass/ass_render.c @ 20226:42140caaf210

Fix crash because of last_glyph < first_glyph, probably caused by first line only consisting of '\n'
author reimar
date Sun, 15 Oct 2006 13:03:43 +0000
parents 9b67ed06f721
children 4a804e013007
line wrap: on
line diff
--- a/libass/ass_render.c	Sun Oct 15 12:53:46 2006 +0000
+++ b/libass/ass_render.c	Sun Oct 15 13:03:43 2006 +0000
@@ -1724,7 +1724,7 @@
 				glyph_info_t* first_glyph = text_info.glyphs + last_break + 1;
 				glyph_info_t* last_glyph = text_info.glyphs + i - 1;
 
-				while ((last_glyph >= first_glyph) && ((last_glyph->symbol == '\n') || (last_glyph->symbol == 0)))
+				while ((last_glyph > first_glyph) && ((last_glyph->symbol == '\n') || (last_glyph->symbol == 0)))
 					last_glyph --;
 
 				width = last_glyph->pos.x + last_glyph->bbox.xMax - first_glyph->pos.x - first_glyph->bbox.xMin;