Merge pull request #24 from Sku-111/main

gsc dumping fix
This commit is contained in:
ZEROPOINT 2024-02-03 21:47:16 -07:00 committed by GitHub
commit ffa97e06f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -147,7 +147,7 @@ void dump_gsc_script(std::ofstream& stream, ScriptFile* scriptfile)
std::string buffer; std::string buffer;
buffer.append(scriptfile->name, strlen(scriptfile->name) + 1); 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->len), 4);
buffer.append(reinterpret_cast<char*>(&scriptfile->bytecodeLen), 4); buffer.append(reinterpret_cast<char*>(&scriptfile->bytecodeLen), 4);
buffer.append(scriptfile->buffer, scriptfile->compressedLen); buffer.append(scriptfile->buffer, scriptfile->compressedLen);
@ -156,6 +156,7 @@ void dump_gsc_script(std::ofstream& stream, ScriptFile* scriptfile)
stream << buffer; stream << buffer;
} }
void ProcessScriptFile(void* scrContext, ScriptFile* scriptfile) void ProcessScriptFile(void* scrContext, ScriptFile* scriptfile)
{ {
/*if (scriptfile) /*if (scriptfile)