Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OP_CLOSURE decompiles incorrectly if Lua uses non-standard opcode order #74

Open
jalbert-dev opened this issue Aug 16, 2020 · 0 comments · May be fixed by #73
Open

OP_CLOSURE decompiles incorrectly if Lua uses non-standard opcode order #74

jalbert-dev opened this issue Aug 16, 2020 · 0 comments · May be fixed by #73

Comments

@jalbert-dev
Copy link

Normal Lua stores opcode and operands in 32 bits in Op-A-C-B order, but I have an implementation here that uses a different ordering which caused OP_CLOSURE to decompile incorrectly. I found that the decompiler looks in register C for the function index, but this is wrong; it should look in Bx. I've made a PR to fix this issue (#73).

The disassembler already has the correct behaviour, so no changes are necessary there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant