aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/lua/lbaselib.c
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-11-02 11:17:58 +0800
committerLi Jin <dragon-fly@qq.com>2021-11-02 11:17:58 +0800
commit827c3736f357e09168fc108e8e740c6425d37d9b (patch)
tree259f977bf7f4ebe0e397fe5e1b74e7fbb1b75e8e /src/3rdParty/lua/lbaselib.c
parentaed806476fe50899c0f01750175531ac41267b9d (diff)
downloadyuescript-827c3736f357e09168fc108e8e740c6425d37d9b.tar.gz
yuescript-827c3736f357e09168fc108e8e740c6425d37d9b.tar.bz2
yuescript-827c3736f357e09168fc108e8e740c6425d37d9b.zip
fix a wrong code generating issue, update builtin Lua.
Diffstat (limited to 'src/3rdParty/lua/lbaselib.c')
-rw-r--r--src/3rdParty/lua/lbaselib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/3rdParty/lua/lbaselib.c b/src/3rdParty/lua/lbaselib.c
index fd6687e..912c4cc 100644
--- a/src/3rdParty/lua/lbaselib.c
+++ b/src/3rdParty/lua/lbaselib.c
@@ -285,7 +285,8 @@ static int luaB_pairs (lua_State *L) {
285** Traversal function for 'ipairs' 285** Traversal function for 'ipairs'
286*/ 286*/
287static int ipairsaux (lua_State *L) { 287static int ipairsaux (lua_State *L) {
288 lua_Integer i = luaL_checkinteger(L, 2) + 1; 288 lua_Integer i = luaL_checkinteger(L, 2);
289 i = luaL_intop(+, i, 1);
289 lua_pushinteger(L, i); 290 lua_pushinteger(L, i);
290 return (lua_geti(L, 1, i) == LUA_TNIL) ? 1 : 2; 291 return (lua_geti(L, 1, i) == LUA_TNIL) ? 1 : 2;
291} 292}