From 30309ec8d3eb39f6f5c05ff0e7464095c5d7bfbf Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Tue, 5 Jul 2022 18:33:19 +0000 Subject: [PATCH] [subset] add null element in _filter_tag_list. --- src/hb-subset-plan.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-subset-plan.cc b/src/hb-subset-plan.cc index 68a1741ff..3716a8ba2 100644 --- a/src/hb-subset-plan.cc +++ b/src/hb-subset-plan.cc @@ -119,6 +119,9 @@ static bool _filter_tag_list(hb_vector_t* tags, /* IN/OUT */ out.push (tag); } + // The collect function needs a null element to signal end of the array. + out.push (HB_TAG_NONE); + hb_swap (out, *tags); return removed; } @@ -145,9 +148,6 @@ static void _collect_layout_indices (hb_subset_plan_t *plan, || !plan->check_success (!scripts.in_error ()) || !scripts) return; - // The collect function needs a null element to signal end of the array. - features.push (0); - scripts.push (0); layout_collect_func (plan->source, T::tableTag, retain_all_scripts ? nullptr : scripts.arrayZ,