[gsub] Don't substitute in ReverseChainSingleSubstFormat1 if missing substitute

Fixes https://github.com/harfbuzz/harfbuzz/issues/2467
This commit is contained in:
Behdad Esfahbod 2020-06-17 16:29:09 -07:00
parent e7c79e16b8
commit 41ef75f64a

View File

@ -1205,7 +1205,9 @@ struct ReverseChainSingleSubstFormat1
const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead);
unsigned int start_index = 0, end_index = 0;
if (unlikely (index >= substitute.len)) return_trace (false);
unsigned int start_index = 0, end_index = 0;
if (match_backtrack (c,
backtrack.len, (HBUINT16 *) backtrack.arrayZ,
match_coverage, this,