libluna: Fix Vector::shallow_copy()

This commit is contained in:
apio 2023-06-19 12:23:39 +02:00
parent d50ea76bdc
commit 8542cf7cbf
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -212,7 +212,7 @@ template <typename T> class Vector
{ {
Vector<T> other; Vector<T> other;
TRY(other.try_reserve(m_capacity)); TRY(other.try_reserve(m_capacity));
memcpy(other.m_data, m_data, m_size); memcpy(other.m_data, m_data, m_size * sizeof(T));
other.m_size = m_size; other.m_size = m_size;
return other; return other;
} }