From 2def7289f3cb02c3a3edc51e26ce3f634033e264 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 18 Nov 2020 18:36:19 -0800 Subject: [PATCH] Wii: Fix crash on unloading irregularly sized GBA ROMs --- CHANGES | 1 + src/gba/gba.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 4e3cb52f1..90262a486 100644 --- a/CHANGES +++ b/CHANGES @@ -62,6 +62,7 @@ Other fixes: - Qt: Fix cancelling pausing before the frame ends - SM83: Simplify register pair access on big endian - SM83: Disassemble STOP as one byte + - Wii: Fix crash on unloading irregularly sized GBA ROMs Misc: - 3DS: Use "wide mode" where applicable for slightly better filtering - Core: Add savedataUpdated callback diff --git a/src/gba/gba.c b/src/gba/gba.c index 23801dd43..eb405de37 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -130,7 +130,7 @@ void GBAUnloadROM(struct GBA* gba) { if (gba->yankedRomSize) { gba->yankedRomSize = 0; } -#if !defined(FIXED_ROM_BUFFER) && !defined(__wii__) +#ifndef FIXED_ROM_BUFFER mappedMemoryFree(gba->memory.rom, SIZE_CART0); #endif }