break early if we run past the message length

This commit is contained in:
Brad Parker 2016-09-29 12:25:20 -04:00
parent 4dcd08c574
commit b83d2529e2

View File

@ -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 ... */