From 4e5b61f22092456acff87eab0784ecc50f06b5a3 Mon Sep 17 00:00:00 2001 From: negativeExponent Date: Fri, 21 May 2021 12:49:47 +0800 Subject: [PATCH] Backport fix https://github.com/libretro/vba-next/commit/e560db692f27d8656a71e20e24ee28f8e777e36e --- src/gba/GBAinline.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gba/GBAinline.h b/src/gba/GBAinline.h index a715a8ef..f4f5862c 100644 --- a/src/gba/GBAinline.h +++ b/src/gba/GBAinline.h @@ -133,8 +133,8 @@ static inline uint32_t CPUReadMemory(uint32_t address) case 15: if (cpuFlashEnabled | cpuSramEnabled) { // no need to swap this value = flashRead(address) * 0x01010101; + break; } - break; // default default: unreadable: @@ -288,6 +288,7 @@ static inline uint32_t CPUReadHalfWord(uint32_t address) if (cpuFlashEnabled | cpuSramEnabled) { // no need to swap this value = flashRead(address) * 0x0101; + break; } // default default: @@ -638,7 +639,7 @@ static inline void CPUWriteHalfWord(uint32_t address, uint16_t value) (*cpuSaveGameFunc)(address, (uint8_t)value); break; } - goto unwritable; + // fallthrough default: unwritable: #ifdef GBA_LOGGING