summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-10-15 13:03:43 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-10-15 13:03:43 +0000
commit404c75b083288ea426c510101a21d0a652a3669c (patch)
treecf6a2f7bae7a27aa11d5319f22c392b98e9fa347 /libass
parent07d46a2ee9d21ce5ff18cdc5bd314034d94fa0cb (diff)
downloadmpv-404c75b083288ea426c510101a21d0a652a3669c.tar.bz2
mpv-404c75b083288ea426c510101a21d0a652a3669c.tar.xz
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
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_render.c2
1 files changed, 1 insertions, 1 deletions
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;