mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 07:13:45 +01:00
Localize variable
This commit is contained in:
parent
82f0e2942a
commit
91841fdfa4
2
init.lua
2
init.lua
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user