From 2de7efd9ebaaeb827db864ce98ea84f9052a1b1d Mon Sep 17 00:00:00 2001 From: Squall Leonhart Date: Sun, 16 Mar 2025 07:39:57 +1100 Subject: [PATCH] Reallocate GBA ROM to the the new size(#1422) The GBA ROM was erroneously reallocated to the constant `ROM_SIZE`. Closes #1421 --- src/core/gba/gba.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/gba/gba.cpp b/src/core/gba/gba.cpp index c3f0f36a..6551ca90 100644 --- a/src/core/gba/gba.cpp +++ b/src/core/gba/gba.cpp @@ -481,7 +481,7 @@ void gbaUpdateRomSize(int size) if (size > romSize) { romSize = size; - uint8_t* tmp = (uint8_t*)realloc(g_rom, SIZE_ROM); + uint8_t* tmp = (uint8_t*)realloc(g_rom, romSize); g_rom = tmp; uint16_t* temp = (uint16_t*)(g_rom + ((romSize + 1) & ~1));