From 1572ba281acb7fb3510d97e0f52bea83a1d6050d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 21 Nov 2022 22:26:44 -0700 Subject: [PATCH] [subset-cff] Return in subr closure if already seen subr Not sure why this was not done before. --- src/hb-subset-cff-common.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-subset-cff-common.hh b/src/hb-subset-cff-common.hh index b4e2832e1..338b0acf7 100644 --- a/src/hb-subset-cff-common.hh +++ b/src/hb-subset-cff-common.hh @@ -825,6 +825,8 @@ struct subr_subsetter_t hb_set_t *closure, const subr_subset_param_t ¶m) { + if (closure->has (subr_num)) + return; closure->add (subr_num); collect_subr_refs_in_str (subrs[subr_num], param); }