This commit is contained in:
Behdad Esfahbod committed 2015-02-25 15:43:35 -08:00
1 parent 68e04afbb1
commit ef79bdf73b
1 file changed
+3 -2
+3 -2
View File
@@ -984,8 +984,9 @@ struct ClassDefFormat1
private:
inline unsigned int get_class (hb_codepoint_t glyph_id) const
{
if (unlikely ((unsigned int) (glyph_id - startGlyph) < classValue.len))
return classValue[glyph_id - startGlyph];
unsigned int i = (unsigned int) (glyph_id - startGlyph);
if (unlikely (i < classValue.len))
return classValue[i];
return 0;
}