From c4e36f97b6df1eb5fba588b09ae1630bb5c49589 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 24 Jan 2019 17:06:16 +0100 Subject: [PATCH] [AAT] Minor --- src/hb-aat-layout-common.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index df41741f5..84f043311 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -529,6 +529,7 @@ struct StateTable { TRACE_SANITIZE (this); if (unlikely (!(c->check_struct (this) && + nClasses >= 4 /* Ensure pre-defined classes fit. */ && classTable.sanitize (c, this)))) return_trace (false); const HBUSHORT *states = (this+stateArrayTable).arrayZ; @@ -773,7 +774,7 @@ struct StateTableDriver /* Unsafe-to-break if end-of-text would kick in here. */ if (buffer->idx + 2 <= buffer->len) { - const Entry *end_entry = machine.get_entryZ (state, 0); + const Entry *end_entry = machine.get_entryZ (state, StateTable::CLASS_END_OF_TEXT); if (c->is_actionable (this, end_entry)) buffer->unsafe_to_break (buffer->idx, buffer->idx + 2); }