mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
break early if we run past the message length
This commit is contained in:
parent
4dcd08c574
commit
b83d2529e2
1 changed files with 5 additions and 0 deletions
|
@ -326,8 +326,13 @@ static void gl_raster_font_render_line(
|
|||
unsigned skip = msg_tmp - &msg[i];
|
||||
|
||||
if (skip > 1)
|
||||
{
|
||||
i += skip - 1;
|
||||
|
||||
if (i >= msg_len)
|
||||
break;
|
||||
}
|
||||
|
||||
glyph = font->font_driver->get_glyph(font->font_data, code);
|
||||
|
||||
if (!glyph) /* Do something smarter here ... */
|
||||
|
|
Loading…
Add table
Reference in a new issue