mirror of https://github.com/mgba-emu/mgba.git
GBA BIOS: Fix overzealous LZ77 checks
This commit is contained in:
parent
69aa7ac3ae
commit
07098984e4
|
@ -536,15 +536,9 @@ static void _unLz77(struct GBA* gba, int width) {
|
||||||
disp = dest - (block & 0x0FFF) - 1;
|
disp = dest - (block & 0x0FFF) - 1;
|
||||||
bytes = (block >> 12) + 3;
|
bytes = (block >> 12) + 3;
|
||||||
while (bytes--) {
|
while (bytes--) {
|
||||||
if (!remaining) {
|
if (remaining) {
|
||||||
if (gba->hardCrash) {
|
--remaining;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
--remaining;
|
|
||||||
if (width == 2) {
|
if (width == 2) {
|
||||||
byte = (int16_t) cpu->memory.load16(cpu, disp & ~1, 0);
|
byte = (int16_t) cpu->memory.load16(cpu, disp & ~1, 0);
|
||||||
if (dest & 1) {
|
if (dest & 1) {
|
||||||
|
|
Loading…
Reference in New Issue