diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index cc1af15722c4fe2fa9c962a59fba699439cd9ceb..fd64c9248c5787150ada59ed2c5285ea01619c99 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -760,6 +760,14 @@ struct Lookup return_trace (true); } + /* Older compilers need this to NOT be locally defined in a function. */ + template + struct SubTableSanitizeWrapper : TSubTable + { + inline bool sanitize (hb_sanitize_context_t *c, unsigned int lookup_type) const + { return this->dispatch (c, lookup_type); } + }; + template inline bool sanitize (hb_sanitize_context_t *c) const { @@ -771,7 +779,9 @@ struct Lookup if (!markFilteringSet.sanitize (c)) return_trace (false); } - if (unlikely (!dispatch (c))) return_trace (false); + if (unlikely (!CastR > > (subTable) + .sanitize (c, this, get_type ()))) + return_trace (false); if (unlikely (get_type () == TSubTable::Extension)) {