From 55a7d81740fd4e932ac101cb0c869eaa384fedc3 Mon Sep 17 00:00:00 2001
From: Behdad Esfahbod <behdad@behdad.org>
Date: Sun, 1 Jan 2023 23:07:42 -0700
Subject: [PATCH] [vector] Allocate exact size in operator=

---
 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 708fd48f9..8696003e9 100644
--- a/src/hb-vector.hh
+++ b/src/hb-vector.hh
@@ -116,7 +116,7 @@ struct hb_vector_t
   hb_vector_t& operator = (const hb_vector_t &o)
   {
     reset ();
-    alloc (o.length);
+    alloc (o.length, true);
     if (unlikely (in_error ())) return *this;
 
     copy_vector (o);