mirror of
https://github.com/kepler155c/opus
synced 2025-07-04 11:02:52 +00:00
fix util.runfunction
This commit is contained in:
parent
c0c054f802
commit
498ab968ee
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user