From 0ced8f3c8efc18dc2ebeb63bfbc3598604af05f1 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Fri, 5 Aug 2022 17:35:35 -0300 Subject: [PATCH] bios_extract: Fix notlzhuf decompressor --- bios_extract/src/phoenix_extract.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bios_extract/src/phoenix_extract.c b/bios_extract/src/phoenix_extract.c index 6417c52..bdf2fbb 100644 --- a/bios_extract/src/phoenix_extract.c +++ b/bios_extract/src/phoenix_extract.c @@ -163,7 +163,7 @@ typedef struct { /* "LZHUF" algorithm implemented using JankyBox. */ -static uint8_t daten[65536]; +#define daten state->mem /* this somehow works better than making it a variable */ void e5(state_t *state) { push(eax); @@ -469,7 +469,7 @@ loc_0_7585: int unnotlzh(unsigned char *in, int insz, unsigned char *out, int outsz) { state_t state_s = {0}, *state = &state_s; - int srcoffset = 0, destoffset = 65536; + int srcoffset = 65536, destoffset = 131072; if (insz > (destoffset - srcoffset)) insz = destoffset - srcoffset;