all repos — mgba @ 07098984e4b3ae1a01361d43c93f7b1dcc90dc00

mGBA Game Boy Advance Emulator

GBA BIOS: Fix overzealous LZ77 checks
Vicki Pfau vi@endrift.com
Thu, 04 Jan 2018 21:42:44 -0800
commit

07098984e4b3ae1a01361d43c93f7b1dcc90dc00

parent

69aa7ac3aed1b77f214ece118eefbaa25a2545f4

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

jump to
M src/gba/bios.csrc/gba/bios.c

@@ -536,15 +536,9 @@ source += 2;

disp = dest - (block & 0x0FFF) - 1; bytes = (block >> 12) + 3; while (bytes--) { - if (!remaining) { - if (gba->hardCrash) { - mLOG(GBA_BIOS, FATAL, "Improperly compressed LZ77 data. Real BIOS would hang."); - } else { - mLOG(GBA_BIOS, GAME_ERROR, "Improperly compressed LZ77 data. Real BIOS would hang."); - } - break; + if (remaining) { + --remaining; } - --remaining; if (width == 2) { byte = (int16_t) cpu->memory.load16(cpu, disp & ~1, 0); if (dest & 1) {