summaryrefslogtreecommitdiff
path: root/server/src/vm/library.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/vm/library.lua')
-rw-r--r--server/src/vm/library.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/src/vm/library.lua b/server/src/vm/library.lua
index 6f038554..e1bd335e 100644
--- a/server/src/vm/library.lua
+++ b/server/src/vm/library.lua
@@ -5,6 +5,7 @@ local functionMgr
local CHILD_CACHE = {}
local VALUE_CACHE = {}
+local Special = {}
local buildLibValue
local buildLibChild
@@ -39,6 +40,9 @@ function buildLibValue(lib)
func:setReturn(i, buildLibValue(rtn))
end
end
+ if lib.special == 'pairs' then
+ func:setReturn(1, Special['next'])
+ end
end
elseif tp == 'string' then
value = valueMgr.create('string', sourceMgr.dummy())
@@ -64,6 +68,10 @@ function buildLibValue(lib)
end
end
+ if lib.special == 'next' then
+ Special['next'] = value
+ end
+
return value
end