Reallocate GBA ROM to the the new size(#1422)

The GBA ROM was erroneously reallocated to the constant `ROM_SIZE`.

Closes #1421
This commit is contained in:
Squall Leonhart 2025-03-16 07:39:57 +11:00 committed by GitHub
parent 5b4559f4ee
commit 2de7efd9eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -481,7 +481,7 @@ void gbaUpdateRomSize(int size)
if (size > romSize) { if (size > romSize) {
romSize = size; romSize = size;
uint8_t* tmp = (uint8_t*)realloc(g_rom, SIZE_ROM); uint8_t* tmp = (uint8_t*)realloc(g_rom, romSize);
g_rom = tmp; g_rom = tmp;
uint16_t* temp = (uint16_t*)(g_rom + ((romSize + 1) & ~1)); uint16_t* temp = (uint16_t*)(g_rom + ((romSize + 1) & ~1));