From a47b0aebf5f8d56dd78ddd651d40727b729a7577 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 19 May 2022 15:52:00 -0600 Subject: [PATCH] [vector] Fix remove() implementation test-vector under valgrind happy now. --- 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 0eb8e2d75..f6915209c 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -392,8 +392,8 @@ struct hb_vector_t : std::conditional, hb_empty { if (unlikely (i >= length)) return; - arrayZ[i].~Type (); shift_down_vector (i + 1); + arrayZ[length - 1].~Type (); length--; }