[subset-cff] Return in subr closure if already seen subr

Not sure why this was not done before.
This commit is contained in:
Behdad Esfahbod 2022-11-21 22:26:44 -07:00
parent a29ca6efbc
commit 1572ba281a
1 changed files with 2 additions and 0 deletions

View File

@ -825,6 +825,8 @@ struct subr_subsetter_t
hb_set_t *closure, hb_set_t *closure,
const subr_subset_param_t &param) const subr_subset_param_t &param)
{ {
if (closure->has (subr_num))
return;
closure->add (subr_num); closure->add (subr_num);
collect_subr_refs_in_str (subrs[subr_num], param); collect_subr_refs_in_str (subrs[subr_num], param);
} }