1
0
mirror of https://github.com/kepler155c/opus synced 2025-07-04 02:52:53 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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