Fix alternate off-by-one

This commit is contained in:
Behdad Esfahbod committed 2010-05-20 17:46:20 +01:00
1 parent b634beb39e
commit fdca3d5160
1 file changed
+1 -1
+1 -1
View File
@@ -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;