GBA Memory: Return correct byte in out of bounds ROM read
jsmolka jsmolka@pm.me
Sat, 21 Nov 2020 16:47:37 +0100
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/gba/memory.c
→
src/gba/memory.c
@@ -679,7 +679,7 @@ } else if (memory->vfame.cartType) {
value = GBAVFameGetPatternValue(address, 8); } else { mLOG(GBA_MEM, GAME_ERROR, "Out of bounds ROM Load8: 0x%08X", address); - value = (address >> 1) & 0xFF; + value = ((address >> 1) >> ((address & 1) * 8)) & 0xFF; } break; case REGION_CART_SRAM: