1
0
mirror of https://github.com/kepler155c/opus synced 2025-11-09 03:53:02 +00:00

fix util.runfunction

This commit is contained in:
Kan18
2019-07-19 17:08:54 -04:00
committed by GitHub
parent c0c054f802
commit 498ab968ee

View File

@@ -551,8 +551,9 @@ function Util.run(env, path, ...)
end
function Util.runFunction(env, fn, ...)
setfenv(fn, env)
--setfenv(fn, env)
setmetatable(env, { __index = _G })
fn = load(fn,"util.runfunction",nil,env)
return pcall(fn, ...)
end