changeset 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 bdd028a5c834
children 5bc5ca236d93
files libass/ass_render.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;