Behdad Esfahbod 2019-01-17 14:06:37 -05:00
parent a262eb3d0b
commit 6879efc2c1
3 changed files with 2 additions and 1 deletions

View File

@ -69,7 +69,8 @@ struct ankr
if (!offset) if (!offset)
return Null(Anchor); return Null(Anchor);
const GlyphAnchors &anchors = StructAtOffset<GlyphAnchors> (&(this+anchorData), *offset); const GlyphAnchors &anchors = StructAtOffset<GlyphAnchors> (&(this+anchorData), *offset);
if (unlikely (end - (const char *) &anchors < anchors.len.static_size || if (unlikely (end < (const char *) &anchors ||
end - (const char *) &anchors < anchors.len.static_size ||
end - (const char *) &anchors < anchors.get_size ())) end - (const char *) &anchors < anchors.get_size ()))
return Null(Anchor); return Null(Anchor);
return anchors[i]; return anchors[i];