all repos — mgba @ 1caa17c00bf58a54956f16711a574e89536a47e4

mGBA Game Boy Advance Emulator

GB I/O: Fix bootrom running forever
Vicki Pfau vi@endrift.com
Fri, 02 Jun 2017 15:58:00 -0700
commit

1caa17c00bf58a54956f16711a574e89536a47e4

parent

825805a2c09c9c39c9afb572d6fb73614085ffa2

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/gb/io.csrc/gb/io.c

@@ -382,7 +382,7 @@ GBVideoWriteSTAT(&gb->video, value);

value = gb->video.stat; break; case 0x50: - if (gb->memory.romBase < gb->memory.rom && gb->memory.romBase > &gb->memory.rom[gb->memory.romSize - 1]) { + if (gb->memory.romBase < gb->memory.rom || gb->memory.romBase > &gb->memory.rom[gb->memory.romSize - 1]) { free(gb->memory.romBase); gb->memory.romBase = gb->memory.rom; }