This commit is contained in:
Behdad Esfahbod 2015-02-21 16:49:15 +03:00
parent 68e04afbb1
commit ef79bdf73b
1 changed files with 3 additions and 2 deletions

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;
}