GB I/O: Fix bootrom running forever

This commit is contained in:
Vicki Pfau 2017-06-02 15:58:00 -07:00
parent 825805a2c0
commit 1caa17c00b
1 changed files with 1 additions and 1 deletions

View File

@ -382,7 +382,7 @@ void GBIOWrite(struct GB* gb, unsigned address, uint8_t 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;
}