Hello i encounter an error when decompiling lua scrip 5.0 using unluac.jar
Exception in thread "main" java.lang.IllegalStateException
at unluac.parse.BHeader.<init>(BHeader.java:28)
at unluac.Main.file_to_function(Main.java:55)
at unluac.Main.main(Main.java:34)</init>
here are the lua script;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It was compiled with MAXSTACK 300 which for Lua 5.0 changes the way that certain bytecode instructions referencing constants are encoded. (It sounds like you're maybe using an old unluac version as well, but that's neither here nor there.)
It's easy to adapt unluac for this change:
diff -r d01ab6b389a8 src/unluac/Version.java--- a/src/unluac/Version.java Mon Jun 10 11:58:34 2024 -0700+++ b/src/unluac/Version.java Tue Oct 29 09:46:43 2024 -0700@@ -181,7 +181,7 @@ environmenttable = new Setting<>(null);
useifbreakrewrite = new Setting<>(false);
usegoto = new Setting<>(false);
- rkoffset = new Setting<>(250);+ rkoffset = new Setting<>(300); allownegativeint = new Setting<Boolean>(false);
constantslengthmode = new Setting<>(ListLengthMode.STRICT);
functionslengthmode = new Setting<>(ListLengthMode.STRICT);
Hello i encounter an error when decompiling lua scrip 5.0 using unluac.jar
Exception in thread "main" java.lang.IllegalStateException
at unluac.parse.BHeader.<init>(BHeader.java:28)
at unluac.Main.file_to_function(Main.java:55)
at unluac.Main.main(Main.java:34)</init>
It was compiled with MAXSTACK 300 which for Lua 5.0 changes the way that certain bytecode instructions referencing constants are encoded. (It sounds like you're maybe using an old unluac version as well, but that's neither here nor there.)
It's easy to adapt unluac for this change:
alright thanks bro.