From 22994af7288c0614278b681e8340a9c77190214e Mon Sep 17 00:00:00 2001 From: uramer Date: Mon, 16 May 2022 16:32:18 +0200 Subject: [PATCH] Fix Lua pairs and ipairs --- components/lua/luastate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lua/luastate.cpp b/components/lua/luastate.cpp index 4056fb59f9..b5b0832b98 100644 --- a/components/lua/luastate.cpp +++ b/components/lua/luastate.cpp @@ -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