From 29dd9abb3f18b30808a1323e460e046340e98eb0 Mon Sep 17 00:00:00 2001 From: CHatingPython Date: Sat, 15 Aug 2026 23:13:45 +0200 Subject: [PATCH] fix(furvm): more fixing --- furvm/include/furvm/thing.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/furvm/include/furvm/thing.hpp b/furvm/include/furvm/thing.hpp index 41a6e6a..91429b9 100644 --- a/furvm/include/furvm/thing.hpp +++ b/furvm/include/furvm/thing.hpp @@ -271,16 +271,17 @@ public: thing& operator=(const thing& other) { if (this == &other) return *this; + free(); + m_reference = other.m_reference; m_size = other.m_size; - m_allocator = std::move(other.m_allocator); + m_allocator = other.m_allocator; if (m_reference) { m_type = other.m_type; m_data = other.m_data; return *this; } - free(); allocate(other.type()); other.copy(*this); @@ -573,7 +574,7 @@ private: } src = srcDynArr.data; - dst = dstDynArr.data = new std::byte[dstDynArr.size]; + dst = dstDynArr.data = new std::byte[dstDynArr.size * elementSize]; } else { size = arrayType.value.array.size; }