From e2cc20d1c57825686d36f3ce0ac86fac92f02ece Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 11 Apr 2021 23:10:36 +0200 Subject: [PATCH] Fixes HistoryHolder CopyOnto not actually copying memory. Signed-off-by: Deukhoofd --- src/Battling/History/HistoryHolder.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Battling/History/HistoryHolder.hpp b/src/Battling/History/HistoryHolder.hpp index a63e1da..105df5a 100644 --- a/src/Battling/History/HistoryHolder.hpp +++ b/src/Battling/History/HistoryHolder.hpp @@ -76,6 +76,7 @@ namespace CreatureLib::Battling { other._offset = _offset; other._capacity = _capacity; other._memory = static_cast(malloc(_capacity)); + memcpy(other._memory, _memory, _capacity); if (_top != nullptr) { other._top = reinterpret_cast(other._memory + ((u8*)_top - _memory)); }