Localize variable

This commit is contained in:
Lars Mueller 2021-03-30 18:04:45 +02:00
parent 82f0e2942a
commit 91841fdfa4

@ -10,7 +10,7 @@ if _VERSION then
function setfenv(fn, env)
local i = 1
while true do
name = debug.getupvalue(fn, i)
local name = debug.getupvalue(fn, i)
if name == "_ENV" then
debug.setupvalue(fn, i, env)
break