[aat] Add buffer->successful check before buffer->next_glyph()

This commit is contained in:
Behdad Esfahbod 2021-02-18 09:31:46 -07:00
parent bcd10bf274
commit aa80c7c8b4

View File

@ -778,7 +778,7 @@ struct StateTableDriver
state = machine.new_state (entry.newState);
DEBUG_MSG (APPLY, nullptr, "s%d", state);
if (buffer->idx == buffer->len)
if (buffer->idx == buffer->len || unlikely (!buffer->successful))
break;
if (!(entry.flags & context_t::DontAdvance) || buffer->max_ops-- <= 0)