1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-29 22:20:33 +00:00

Merge branch 'fix_pairs' into 'master'

Fix Lua pairs and ipairs

See merge request OpenMW/openmw!1864
This commit is contained in:
Petr Mikheev 2022-05-16 15:52:42 +00:00
commit 7ee796b481

View File

@ -104,7 +104,7 @@ namespace LuaUtil
end
local function nextForArray(array, index)
index = (index or 0) + 1
if index < #array then
if index <= #array then
return index, array[index]
end
end