Prevent leaking of args to global scope

This commit is contained in:
Robin Wellner
2014-03-08 08:30:45 +01:00
parent db46fa0afa
commit 5d6a19aa9c

View File

@@ -64,7 +64,7 @@ end
function lurker.initwrappers() function lurker.initwrappers()
for _, v in pairs(lovecallbacknames) do for _, v in pairs(lovecallbacknames) do
lurker.funcwrappers[v] = function(...) lurker.funcwrappers[v] = function(...)
args = {...} local args = {...}
xpcall(function() xpcall(function()
return lurker.lovefuncs[v] and lurker.lovefuncs[v](unpack(args)) return lurker.lovefuncs[v] and lurker.lovefuncs[v](unpack(args))
end, lurker.onerror) end, lurker.onerror)