From 0e3442ba4820eecf7fd724ed5154247d498b9916 Mon Sep 17 00:00:00 2001 From: Sku-111 Date: Sun, 4 Feb 2024 04:55:44 +0100 Subject: [PATCH] gsc dumping fix fixed compressed buffer not being used properly --- hook_lib/script.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hook_lib/script.cpp b/hook_lib/script.cpp index 8a1e97b..80c4db8 100644 --- a/hook_lib/script.cpp +++ b/hook_lib/script.cpp @@ -147,7 +147,7 @@ void dump_gsc_script(std::ofstream& stream, ScriptFile* scriptfile) std::string buffer; buffer.append(scriptfile->name, strlen(scriptfile->name) + 1); - buffer.append(scriptfile->compressedLen, 4); + buffer.append(reinterpret_cast(&scriptfile->compressedLen), 4); buffer.append(reinterpret_cast(&scriptfile->len), 4); buffer.append(reinterpret_cast(&scriptfile->bytecodeLen), 4); buffer.append(scriptfile->buffer, scriptfile->compressedLen); @@ -156,6 +156,7 @@ void dump_gsc_script(std::ofstream& stream, ScriptFile* scriptfile) stream << buffer; } + void ProcessScriptFile(void* scrContext, ScriptFile* scriptfile) { /*if (scriptfile)