diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index ee05a045e..c2eed5d41 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -127,7 +127,7 @@ struct KerxSubTableFormat2 { unsigned int l = (this+leftClassTable).get_class (left); unsigned int r = (this+leftClassTable).get_class (left); - unsigned int offset = l * rowWidth + r * sizeof (FWORD); + unsigned int offset = l + r; const FWORD *arr = &(this+array); if (unlikely ((const void *) arr < (const void *) this || (const void *) arr >= (const void *) end)) return 0; diff --git a/src/hb-ot-kern-table.hh b/src/hb-ot-kern-table.hh index 8ed6298f1..d26f402c1 100644 --- a/src/hb-ot-kern-table.hh +++ b/src/hb-ot-kern-table.hh @@ -118,7 +118,7 @@ struct KernSubTableFormat2 { unsigned int l = (this+leftClassTable).get_class (left); unsigned int r = (this+rightClassTable).get_class (right); - unsigned int offset = l * rowWidth + r * sizeof (FWORD); + unsigned int offset = l + r; const FWORD *arr = &(this+array); if (unlikely ((const void *) arr < (const void *) this || (const void *) arr >= (const void *) end)) return 0;