Fix hypothetical bug in getargs

master
Lars Mueller 2022-07-08 14:32:27 +02:00
parent 56b51c5e26
commit 34a11f701e
1 changed files with 2 additions and 2 deletions

View File

@ -232,8 +232,8 @@ local function getargs(func)
local i = 1
while true do
local name = debug.getlocal(2, i)
if name == nil or name:match"^%(" then break end
table.insert(args, name)
if name == nil then break end
if not name:match"^%(" then table.insert(args, name) end
i = i + 1
end
error(args)