From 3e471bbc0801d8fc0093d4e536633e6a89d4d32b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 4 Jan 2023 11:53:49 -0700 Subject: [PATCH] [vector] Better test --- src/hb-vector.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 7d2180077..b78605fcd 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -391,7 +391,7 @@ struct hb_vector_t if (unlikely (new_allocated && !new_array)) { - if (exact and new_allocated == length) + if (new_allocated <= (unsigned) allocated) return true; // shrinking failed; it's okay; happens in our fuzzer allocated = -1;