[aat] More protection against buffer fail

This commit is contained in:
Behdad Esfahbod 2018-10-14 19:30:44 -07:00
parent e1add2a275
commit 7efa38257b
1 changed files with 4 additions and 3 deletions

View File

@ -507,8 +507,9 @@ struct StateTableDriver
if (!c->in_place) if (!c->in_place)
{ {
for (; buffer->idx < buffer->len;) for (; buffer->successful && buffer->idx < buffer->len;)
buffer->next_glyph (); buffer->next_glyph ();
if (likely (buffer->successful))
buffer->swap_buffers (); buffer->swap_buffers ();
} }
} }