From d30a099cd0f9d57b9c3a5850b541b785e205bdd4 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Wed, 11 Oct 2017 02:43:13 +0100 Subject: [PATCH] fix crash in vector::expand() --- src/util/vector.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/vector.h b/src/util/vector.h index c21d33bab..03c450660 100644 --- a/src/util/vector.h +++ b/src/util/vector.h @@ -87,6 +87,7 @@ class vector { m_data = reinterpret_cast(mem + 2); if (!std::is_trivially_copyable::value) { static_assert(std::is_move_constructible::value, ""); + mem[1] = old_size; int i = 0; for (auto I = old_data; I != old_data + old_size; ++I) { new (&m_data[i++]) T(std::move(*I));