Fixes HistoryHolder CopyOnto not actually copying memory.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
cd8a29e8fd
commit
e2cc20d1c5
|
@ -76,6 +76,7 @@ namespace CreatureLib::Battling {
|
|||
other._offset = _offset;
|
||||
other._capacity = _capacity;
|
||||
other._memory = static_cast<uint8_t*>(malloc(_capacity));
|
||||
memcpy(other._memory, _memory, _capacity);
|
||||
if (_top != nullptr) {
|
||||
other._top = reinterpret_cast<HistoryElement*>(other._memory + ((u8*)_top - _memory));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue