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:
parent
5b4559f4ee
commit
2de7efd9eb
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue