From 2d098d5d7f223d587abe4e8926a911cfbb5eef62 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 22 Nov 2022 11:51:04 -0700 Subject: [PATCH] [gvar] Use memset --- src/hb-ot-var-gvar-table.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-var-gvar-table.hh b/src/hb-ot-var-gvar-table.hh index cdfe5b984..34e505662 100644 --- a/src/hb-ot-var-gvar-table.hh +++ b/src/hb-ot-var-gvar-table.hh @@ -607,8 +607,8 @@ struct gvar if (unlikely (!y_deltas.resize (num_deltas, false))) return false; if (unlikely (!GlyphVariationData::unpack_deltas (p, y_deltas, end))) return false; - for (unsigned int i = 0; i < deltas.length; i++) - deltas.arrayZ[i].init (); + hb_memset (deltas.arrayZ, 0, deltas.length * sizeof (deltas.arrayZ[0])); + for (unsigned int i = 0; i < num_deltas; i++) { unsigned int pt_index = apply_to_all ? i : indices[i];