Jake-NotTheMuss / hksc

Havok Script Lua compiler and decompiler
Other
6 stars 2 forks source link

issue: bad code in precompiled chunk #3

Closed Surasia closed 2 months ago

Surasia commented 2 months ago

When I try to decompile/disassemble anything other than a very basic hello world, I get the "bad code in precompiled chunk" error. I compiled hksc using Memoization and Structures extensions, which should be all that is required.

Here's the compiled bytecode file and the disassembly from my own tool: results.zip

Surasia commented 2 months ago

Hm, looking further, my version of a compiled HavokScript has the instruction count (sizecode) after lastlinedefined. Debug Info also seems to be split into its own part in the binary. image image