summaryrefslogtreecommitdiff
path: root/src/hb-aat-layout-morx-table.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/hb-aat-layout-morx-table.hh')
-rw-r--r--src/hb-aat-layout-morx-table.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index c64dca06..7a45a24e 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -275,8 +275,10 @@ struct ContextualSubtable
{
const EntryData &data = entries[i].data;
- num_lookups = MAX<unsigned int> (num_lookups, 1 + data.markIndex);
- num_lookups = MAX<unsigned int> (num_lookups, 1 + data.currentIndex);
+ if (data.markIndex != 0xFFFF)
+ num_lookups = MAX<unsigned int> (num_lookups, 1 + data.markIndex);
+ if (data.currentIndex != 0xFFFF)
+ num_lookups = MAX<unsigned int> (num_lookups, 1 + data.currentIndex);
}
return_trace (substitutionTables.sanitize (c, this, num_lookups));