summaryrefslogtreecommitdiff
path: root/libs/liblua/src/lbaselib.c
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2016-12-27 00:46:46 +0300
committeraunsane <aunsane@gmail.com>2016-12-27 00:47:12 +0300
commit4f5ab8c9b5866c4445d8f37f608244ea9bf4494f (patch)
tree2e1e5a3dee91e0c8f9aed1cdc8f2465d9e1b3d35 /libs/liblua/src/lbaselib.c
parentab80b3e01ac99d5f31e2de10bf8299579afa87b4 (diff)
Updated lua lib to 5.3.4
Diffstat (limited to 'libs/liblua/src/lbaselib.c')
-rw-r--r--libs/liblua/src/lbaselib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/liblua/src/lbaselib.c b/libs/liblua/src/lbaselib.c
index d481c4e1ef..98602952c4 100644
--- a/libs/liblua/src/lbaselib.c
+++ b/libs/liblua/src/lbaselib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lbaselib.c,v 1.313 2016/04/11 19:18:40 roberto Exp $
+** $Id: lbaselib.c,v 1.313 2016/04/11 19:18:40 roberto Exp roberto $
** Basic library
** See Copyright Notice in lua.h
*/
@@ -208,8 +208,8 @@ static int luaB_type (lua_State *L) {
static int pairsmeta (lua_State *L, const char *method, int iszero,
lua_CFunction iter) {
+ luaL_checkany(L, 1);
if (luaL_getmetafield(L, 1, method) == LUA_TNIL) { /* no metamethod? */
- luaL_checktype(L, 1, LUA_TTABLE); /* argument must be a table */
lua_pushcfunction(L, iter); /* will return generator, */
lua_pushvalue(L, 1); /* state, */
if (iszero) lua_pushinteger(L, 0); /* and initial value */