From d620faba0a106abd916e1a909492d3a28853b70b Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 2 Jul 2018 21:30:45 -0700 Subject: [PATCH] GBA: Fix setting mask in ROM size coercion --- src/gba/gba.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gba/gba.c b/src/gba/gba.c index 13dceff92..73a8378a3 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -398,6 +398,7 @@ bool GBALoadROM(struct GBA* gba, struct VFile* vf) { gba->memory.rom = newRom; #endif gba->memory.romSize = SIZE_CART0; + gba->memory.romMask = SIZE_CART0 - 1; gba->isPristine = false; } if (gba->cpu && gba->memory.activeRegion >= REGION_CART0) {