From 404c75b083288ea426c510101a21d0a652a3669c Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 15 Oct 2006 13:03:43 +0000 Subject: Fix crash because of last_glyph < first_glyph, probably caused by first line only consisting of '\n' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20232 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libass/ass_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libass') diff --git a/libass/ass_render.c b/libass/ass_render.c index abb2722051..ba0764d517 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1724,7 +1724,7 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images) 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; -- cgit v1.2.3