mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 15:23:48 +01:00
Fix hashlist:(ipairs|rpairs)
This commit is contained in:
parent
83c5c87390
commit
fbbcc27fed
@ -32,8 +32,9 @@ function list:len()
|
||||
end
|
||||
|
||||
function list:ipairs()
|
||||
local index = 1
|
||||
local index = 0
|
||||
return function()
|
||||
index = index + 1
|
||||
if index > self.length then
|
||||
return
|
||||
end
|
||||
@ -42,8 +43,9 @@ function list:ipairs()
|
||||
end
|
||||
|
||||
function list:rpairs()
|
||||
local index = self.length
|
||||
local index = self.length + 1
|
||||
return function()
|
||||
index = index - 1
|
||||
if index < 1 then
|
||||
return
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user