From 8542cf7cbf222e2994fbae2876383eb42fa5024a Mon Sep 17 00:00:00 2001 From: apio Date: Mon, 19 Jun 2023 12:23:39 +0200 Subject: [PATCH] libluna: Fix Vector::shallow_copy() --- libluna/include/luna/Vector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libluna/include/luna/Vector.h b/libluna/include/luna/Vector.h index 65c73f19..c5ffda56 100644 --- a/libluna/include/luna/Vector.h +++ b/libluna/include/luna/Vector.h @@ -212,7 +212,7 @@ template class Vector { Vector other; 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; return other; }