From 484831be3dd1e113c92370cc5df781432b770ccd Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 15 Jan 2023 16:14:53 -0700 Subject: [PATCH] [util] Fix build --- util/font-options.hh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/font-options.hh b/util/font-options.hh index 66b910180..804a92be3 100644 --- a/util/font-options.hh +++ b/util/font-options.hh @@ -267,14 +267,16 @@ _list_variations (hb_face_t *face) &name_len, name); unsigned coords_count = hb_ot_var_named_instance_get_design_coords (face, i, nullptr, nullptr); - hb_vector_t coords; - coords.resize (coords_count); + float* coords; + coords = (float *) calloc (coords_count, sizeof (float)); hb_ot_var_named_instance_get_design_coords (face, i, &coords_count, coords.arrayZ); printf ("%u. %-32s", i, name); for (unsigned j = 0; j < coords.length; j++) printf ("%g, ", (double) coords[j]); printf ("\n"); + + free (coords); } }