diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-01-25 19:55:41 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-01-25 19:55:41 -0200 |
commit | a048cc9676f3572ebf5d6cc061f87cba85f5a249 (patch) | |
tree | a7a1fe7ebf6b0f1dab20eaf58176e46647e0ebc6 /lbaselib.c | |
parent | eb262bc61754670d45fb030432932c599cdef2d6 (diff) | |
download | lua-a048cc9676f3572ebf5d6cc061f87cba85f5a249.tar.gz lua-a048cc9676f3572ebf5d6cc061f87cba85f5a249.tar.bz2 lua-a048cc9676f3572ebf5d6cc061f87cba85f5a249.zip |
nil is a `valid' eventtable
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |