mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 06:21:16 +01:00
Fix alternate off-by-one
This commit is contained in:
1 parent
b634beb39e
commit
fdca3d5160
1 file changed
+1
-1
@@ -287,7 +287,7 @@ struct AlternateSubstFormat1
|
||||
return false;
|
||||
|
||||
unsigned int shift = _hb_ctz (lookup_mask);
|
||||
unsigned int alt_index = (lookup_mask & glyph_mask) >> shift;
|
||||
unsigned int alt_index = ((lookup_mask & glyph_mask) >> shift) - 1;
|
||||
|
||||
if (unlikely (alt_index >= alt_set.len))
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user