diff options
| author | Li Jin <dragon-fly@qq.com> | 2021-11-02 11:17:58 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2021-11-02 11:17:58 +0800 |
| commit | 827c3736f357e09168fc108e8e740c6425d37d9b (patch) | |
| tree | 259f977bf7f4ebe0e397fe5e1b74e7fbb1b75e8e /src/3rdParty/lua/lbaselib.c | |
| parent | aed806476fe50899c0f01750175531ac41267b9d (diff) | |
| download | yuescript-827c3736f357e09168fc108e8e740c6425d37d9b.tar.gz yuescript-827c3736f357e09168fc108e8e740c6425d37d9b.tar.bz2 yuescript-827c3736f357e09168fc108e8e740c6425d37d9b.zip | |
fix a wrong code generating issue, update builtin Lua.
Diffstat (limited to '')
| -rw-r--r-- | src/3rdParty/lua/lbaselib.c | 3 |
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 | */ |
| 287 | static int ipairsaux (lua_State *L) { | 287 | static 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 | } |
