From 11dbf0f12926b80d0c308c70a218342280045c23 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 30 Oct 2018 21:49:59 -0700 Subject: [PATCH] [mort] More fixes] --- src/hb-aat-layout-common.hh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index 65e7fd93b..33d9e5564 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -430,9 +430,8 @@ struct StateTable CLASS_END_OF_LINE = 3, }; - inline unsigned int row_stride (void) const { return nClasses * sizeof (HBUSHORT); } inline unsigned int new_state (unsigned int newState) const - { return newState / (Types::extended ? 1 : row_stride ()); } + { return Types::extended ? newState : (newState - stateArrayTable) / nClasses; } inline unsigned int get_class (hb_codepoint_t glyph_id, unsigned int num_glyphs) const { @@ -524,7 +523,7 @@ struct StateTable entryTable; /* Offset to the entry array. */ public: - DEFINE_SIZE_STATIC (16); + DEFINE_SIZE_STATIC (4 * sizeof (HBUINT)); }; struct ClassTable