mirror of
https://github.com/mpv-player/mpv
synced 2025-03-01 20:00:37 +00:00
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
This commit is contained in:
parent
07d46a2ee9
commit
404c75b083
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user