From 1cf7d9d0b0c5b94c03f748612e23a7b356355937 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 27 Sep 2024 10:56:14 -0600 Subject: [PATCH] [HVAC] Minor fix get_size() --- src/hb-ot-var-hvac-table.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-var-hvac-table.hh b/src/hb-ot-var-hvac-table.hh index 69f3f0d54..5bd6258e6 100644 --- a/src/hb-ot-var-hvac-table.hh +++ b/src/hb-ot-var-hvac-table.hh @@ -41,7 +41,7 @@ struct GlyphVariationDelta { unsigned get_size (unsigned deltasCount) const { - return regionIndex.static_size + deltasCount * sizeof (deltasZ) * 2; + return regionIndex.static_size + 2 * deltasCount * sizeof (deltasZ[0]); } void apply_deltas_to_points (unsigned deltasCount, @@ -79,7 +79,7 @@ struct GlyphVariationDelta TRACE_SANITIZE (this); return_trace (c->check_struct (this) && hb_barrier () && - c->check_range (this, get_size (deltasCount))); + c->check_array (deltasZ, 2 * deltasCount)); } protected: