diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index da4b37fb2..406a36d8c 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -532,7 +532,7 @@ struct StateTableDriver unsigned int state = StateTable::STATE_START_OF_TEXT; bool last_was_dont_advance = false; - for (buffer->idx = 0;;) + for (buffer->idx = 0; buffer->successful;) { unsigned int klass = buffer->idx < buffer->len ? machine.get_class (buffer->info[buffer->idx].codepoint, num_glyphs) : @@ -566,8 +566,6 @@ struct StateTableDriver if (unlikely (!c->transition (this, entry))) break; - if (unlikely (!buffer->successful)) return; - last_was_dont_advance = (entry->flags & context_t::DontAdvance) && buffer->max_ops-- > 0; state = entry->newState;