From 915db7dc85c4c86241322810f5e88dc3a581629c Mon Sep 17 00:00:00 2001 From: Riyyi Date: Thu, 18 Aug 2022 01:52:10 +0200 Subject: [PATCH] Emulator: Fix vector memory reservation --- src/emu.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/emu.cpp b/src/emu.cpp index 2f8fe85..94cb5f4 100644 --- a/src/emu.cpp +++ b/src/emu.cpp @@ -20,8 +20,7 @@ void Emu::addProcessingUnit(ProcessingUnit* processing_unit) { } void Emu::addMemorySpace(const char* name, int size) { - std::vector memory; - memory.reserve(size); + std::vector memory(size); m_memory_spaces.emplace(name, memory); }