[vector] Allocate exact size in operator=

pull/3501/head
Behdad Esfahbod 2 years ago
parent 449910d431
commit 55a7d81740
  1. 2
      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);

Loading…
Cancel
Save