From 9aad3dba8f6cc91c8039ebfc2c6c6c5fd179a74b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 26 Oct 2022 13:04:02 -0600 Subject: [PATCH] [SingleSubst] Fix degenerate-lookup test Part of https://github.com/harfbuzz/harfbuzz/issues/3853 --- src/OT/Layout/GSUB/SingleSubstFormat1.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OT/Layout/GSUB/SingleSubstFormat1.hh b/src/OT/Layout/GSUB/SingleSubstFormat1.hh index 13665d7ba..1be21b98b 100644 --- a/src/OT/Layout/GSUB/SingleSubstFormat1.hh +++ b/src/OT/Layout/GSUB/SingleSubstFormat1.hh @@ -57,7 +57,7 @@ struct SingleSubstFormat1_3 hb_codepoint_t max_before = intersection.get_max (); hb_codepoint_t min_after = (min_before + d) & mask; hb_codepoint_t max_after = (max_before + d) & mask; - if (pop >= max_before - min_before && + if (intersection.get_population () == max_before - min_before + 1 && ((min_before <= min_after && min_after <= max_before) || (min_before <= max_after && max_after <= max_before))) return;