Skip to content

Commit

Permalink
'ipairs' needs an argument
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto-ieru committed Dec 10, 2014
1 parent bd8ce7e commit 27ab59b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lbaselib.c
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 27ab59b

Please sign in to comment.