[hmtx/vmtx] Fix a crasher
This commit is contained in:
parent
36e90ef56e
commit
e01250230b
|
@ -255,7 +255,7 @@ struct hmtxvmtx
|
||||||
if (glyph < num_advances)
|
if (glyph < num_advances)
|
||||||
return table->longMetricZ[glyph].sb;
|
return table->longMetricZ[glyph].sb;
|
||||||
|
|
||||||
if (unlikely (glyph > num_metrics))
|
if (unlikely (glyph >= num_metrics))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
const FWORD *bearings = (const FWORD *) &table->longMetricZ[num_advances];
|
const FWORD *bearings = (const FWORD *) &table->longMetricZ[num_advances];
|
||||||
|
|
Loading…
Reference in New Issue