[subset] Don't double count visit lookups in closure_lookups

Each recursed lookup was getting counted once in closure_lookups() and then again in hb_closure_lookups_context_t::recurse.
This commit is contained in:
Garret Rieger authored and Behdad Esfahbod committed 2021-12-10 15:13:49 -07:00
1 parent d67025705f
commit 77507a1d8d
1 file changed
+5 -1
+5 -1
View File
@@ -214,7 +214,11 @@ struct hb_closure_lookups_context_t :
return;
/* Return if new lookup was recursed to before. */
if (is_lookup_visited (lookup_index))
if (lookup_limit_exceeded ()
|| visited_lookups->in_error ()
|| visited_lookups->has (lookup_index))
// Don't increment lookup count here, that will be done in the call to closure_lookups()
// made by recurse_func.
return;
nesting_level_left--;