[subset] in sets union correctly size the pointer array.

This commit is contained in:
Garret Rieger 2021-08-27 10:59:28 -07:00
parent 102666dab7
commit 57d6bf8251
1 changed files with 2 additions and 2 deletions

View File

@ -52,14 +52,14 @@ struct hb_subset_input_t
hb_set_t *name_languages; hb_set_t *name_languages;
hb_set_t *layout_features; hb_set_t *layout_features;
} sets; } sets;
hb_set_t* set_ptrs[1]; hb_set_t* set_ptrs[sizeof (sets) / sizeof (hb_set_t*)];
}; };
unsigned flags; unsigned flags;
inline unsigned num_sets () const inline unsigned num_sets () const
{ {
return sizeof (sets) / sizeof (hb_set_t*); return sizeof (set_ptrs) / sizeof (hb_set_t*);
} }
inline hb_array_t<hb_set_t*> sets_iter () inline hb_array_t<hb_set_t*> sets_iter ()