gsc dumping fix

fixed compressed buffer not being used properly
This commit is contained in:
Sku-111 2024-02-04 04:55:44 +01:00
parent 06ad6bee1b
commit 0e3442ba48

View File

@ -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<char*>(&scriptfile->compressedLen), 4);
buffer.append(reinterpret_cast<char*>(&scriptfile->len), 4);
buffer.append(reinterpret_cast<char*>(&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)