lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 27ab59bc16ab5da69c60dba220124072a6e0d774
parent bd8ce7e33188502fe8d42d3dcf29e52eb164fcf6
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Wed, 10 Dec 2014 10:26:17 -0200

'ipairs' needs an argument

Diffstat:
Mlbaselib.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lbaselib.c b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.307 2014/11/10 14:25:52 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.308 2014/12/08 15:26:55 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -274,6 +274,7 @@ static int luaB_ipairs (lua_State *L) { #if defined(LUA_COMPAT_IPAIRS) return pairsmeta(L, "__ipairs", 1, iter); #else + luaL_checkany(L, 1); lua_pushcfunction(L, iter); /* iteration function */ lua_pushvalue(L, 1); /* state */ lua_pushinteger(L, 0); /* initial value */