Permalink
Browse files

GBA: Fix setting mask in ROM size coercion

  • Loading branch information...
endrift committed Jul 3, 2018
1 parent 71f39ba commit d620faba0a106abd916e1a909492d3a28853b70b
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/gba/gba.c
View
@@ -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) {

0 comments on commit d620fab

Please sign in to comment.