From 07098984e4b3ae1a01361d43c93f7b1dcc90dc00 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 4 Jan 2018 21:42:44 -0800 Subject: [PATCH] GBA BIOS: Fix overzealous LZ77 checks --- src/gba/bios.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gba/bios.c b/src/gba/bios.c index debee1e05..e14050184 100644 --- a/src/gba/bios.c +++ b/src/gba/bios.c @@ -536,15 +536,9 @@ static void _unLz77(struct GBA* gba, int width) { 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) {