From df73c58195762938712dcc143ca527dbccaad8cc Mon Sep 17 00:00:00 2001 From: Daniel Selsam Date: Fri, 1 Feb 2019 09:34:24 -0800 Subject: [PATCH] array resize must m_size --- src/api/c++/z3++.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/c++/z3++.h b/src/api/c++/z3++.h index d94b4f36b..1900c6f00 100644 --- a/src/api/c++/z3++.h +++ b/src/api/c++/z3++.h @@ -388,7 +388,7 @@ namespace z3 { template array(ast_vector_tpl const & v); ~array() { delete[] m_array; } - void resize(unsigned sz) { delete[] m_array; m_array = new T[sz]; } + void resize(unsigned sz) { delete[] m_array; m_size = sz; m_array = new T[sz]; } unsigned size() const { return m_size; } T & operator[](int i) { assert(0 <= i); assert(static_cast(i) < m_size); return m_array[i]; } T const & operator[](int i) const { assert(0 <= i); assert(static_cast(i) < m_size); return m_array[i]; }