aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lbaselib.c b/lbaselib.c
index b06cc2b3..87e417aa 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -140,8 +140,9 @@ static int luaB_eventtable (lua_State *L) {
140 if (lua_isnone(L, 2)) 140 if (lua_isnone(L, 2))
141 lua_geteventtable(L, 1); 141 lua_geteventtable(L, 1);
142 else { 142 else {
143 int t = lua_type(L, 2);
144 luaL_arg_check(L, t == LUA_TNIL || t == LUA_TTABLE, 2, "nil/table expected");
143 lua_settop(L, 2); 145 lua_settop(L, 2);
144 luaL_check_type(L, 2, LUA_TTABLE);
145 lua_seteventtable(L, 1); 146 lua_seteventtable(L, 1);
146 } 147 }
147 return 1; 148 return 1;