[hmtx/vmtx] Fix a crasher

This commit is contained in:
Behdad Esfahbod 2018-10-31 18:14:00 -07:00
parent 36e90ef56e
commit e01250230b
1 changed files with 1 additions and 1 deletions

View File

@ -255,7 +255,7 @@ struct hmtxvmtx
if (glyph < num_advances)
return table->longMetricZ[glyph].sb;
if (unlikely (glyph > num_metrics))
if (unlikely (glyph >= num_metrics))
return 0;
const FWORD *bearings = (const FWORD *) &table->longMetricZ[num_advances];