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

a bug in lua5.3 #51

Open
QSlash opened this issue Apr 10, 2017 · 1 comment
Open

a bug in lua5.3 #51

QSlash opened this issue Apr 10, 2017 · 1 comment

Comments

@QSlash
Copy link

QSlash commented Apr 10, 2017

test.lua:
local arry={1,2,3}
function check(idx)
return arry[idx] or arry[#arry]
end

cmd:
luac test.lua
luadec luac.out>res.lua

res.lua:
-- Decompiled using luadec 2.2 rev: $WCREV$ for Lua 5.3 from https://github.com/viruscamp/luadec
-- Command line: luac.out

-- params : ...
-- function num : 0 , upvalues : _ENV
local arry = {1, 2, 3}
check = function(idx)
-- function num : 0_0 , upvalues : arry
if not arry[idx] then
return arry[#arry]
end
end

@rocky
Copy link

rocky commented Mar 11, 2022

Seems like a similar thing to #75 is going on here. So also see the section "Status" in https://github.com/sztupy/luadec51/blob/master/README.markdown

And as with #75 this problem is fixed in unluac

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

No branches or pull requests

2 participants