diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index a301fd3fc..2ebbc3511 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -729,6 +729,8 @@ struct InsertionSubtable hb_buffer_t *buffer = driver->buffer; unsigned int flags = entry->flags; + unsigned mark_loc = buffer->out_len; + if (entry->data.markedInsertIndex != 0xFFFF) { unsigned int count = (flags & MarkedInsertCount); @@ -754,6 +756,9 @@ struct InsertionSubtable buffer->unsafe_to_break_from_outbuffer (mark, MIN (buffer->idx + 1, buffer->len)); } + if (flags & SetMark) + mark = mark_loc; + if (entry->data.currentInsertIndex != 0xFFFF) { unsigned int count = (flags & CurrentInsertCount) >> 5; @@ -791,9 +796,6 @@ struct InsertionSubtable buffer->move_to ((flags & DontAdvance) ? end : end + count); } - if (flags & SetMark) - mark = buffer->out_len; - return true; }