diff options
Diffstat (limited to 'server/src/vm/library.lua')
-rw-r--r-- | server/src/vm/library.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/vm/library.lua b/server/src/vm/library.lua index ed5c2e7f..6f038554 100644 --- a/server/src/vm/library.lua +++ b/server/src/vm/library.lua @@ -22,8 +22,9 @@ function buildLibValue(lib) if tp == 'table' then value = valueMgr.create('table', sourceMgr.dummy()) elseif tp == 'function' then - value = valueMgr.create('function', sourceMgr.dummy()) - local func = functionMgr.create() + local dummySource = sourceMgr.dummy() + value = valueMgr.create('function', dummySource) + local func = functionMgr.create(dummySource) value:setFunction(func) if lib.args then for _, arg in ipairs(lib.args) do |