From e0097396010c40cf62641cd12ceb12dd5d79c9c7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 19 Nov 2018 12:53:53 -0500 Subject: [PATCH] [fvar] Minor --- src/hb-ot-var-fvar-table.hh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/hb-ot-var-fvar-table.hh b/src/hb-ot-var-fvar-table.hh index 3c8a3da..66618a5 100644 --- a/src/hb-ot-var-fvar-table.hh +++ b/src/hb-ot-var-fvar-table.hh @@ -104,8 +104,8 @@ struct fvar instanceSize >= axisCount * 4 + 4 && axisSize <= 1024 && /* Arbitrary, just to simplify overflow checks. */ instanceSize <= 1024 && /* Arbitrary, just to simplify overflow checks. */ - c->check_range (this, things) && - c->check_range (&StructAtOffset (this, things), + c->check_range (this, firstAxis) && + c->check_range (&StructAtOffset (this, firstAxis), axisCount * axisSize + instanceCount * instanceSize)); } @@ -196,7 +196,7 @@ struct fvar protected: inline const AxisRecord * get_axes (void) const - { return &StructAtOffset (this, things); } + { return &(this+firstAxis); } inline const InstanceRecord * get_instances (void) const { return &StructAtOffset (get_axes () + axisCount, 0); } @@ -204,7 +204,8 @@ struct fvar protected: FixedVersion<>version; /* Version of the fvar table * initially set to 0x00010000u */ - Offset16 things; /* Offset in bytes from the beginning of the table + OffsetTo + firstAxis; /* Offset in bytes from the beginning of the table * to the start of the AxisRecord array. */ HBUINT16 reserved; /* This field is permanently reserved. Set to 2. */ HBUINT16 axisCount; /* The number of variation axes in the font (the -- 2.7.4