From 8f88747a5e100adc3f722baf573143cbb812ac48 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 19 Aug 2021 16:30:48 -0600 Subject: [PATCH] [bit-set-invertible] Fix previous() iteration --- src/hb-bit-set-invertible.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-bit-set-invertible.hh b/src/hb-bit-set-invertible.hh index 3b1d9df3e..5be6e451d 100644 --- a/src/hb-bit-set-invertible.hh +++ b/src/hb-bit-set-invertible.hh @@ -239,7 +239,7 @@ struct hb_bit_set_invertible_t auto old = *codepoint; auto v = old; s.previous (&v); - if (old - 1 > v) + if (old - 1 > v || v == INVALID) { *codepoint = old - 1; return true;