diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-15 18:14:49 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-15 18:14:49 -0300 |
commit | d4fb848be77f4b0209acaf37a5b5e1cee741ddce (patch) | |
tree | 01284264836a64a1af08e2d965f574db82cc106f | |
parent | b9dcf9974d4dbff3ca28ff618259e277cb0090ea (diff) | |
download | lua-d4fb848be77f4b0209acaf37a5b5e1cee741ddce.tar.gz lua-d4fb848be77f4b0209acaf37a5b5e1cee741ddce.tar.bz2 lua-d4fb848be77f4b0209acaf37a5b5e1cee741ddce.zip |
added api check in 'lua_typename' (tag is valid)
-rw-r--r-- | lapi.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.222 2014/06/26 18:28:24 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.223 2014/06/30 19:48:08 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -264,7 +264,8 @@ LUA_API int lua_type (lua_State *L, int idx) { | |||
264 | 264 | ||
265 | 265 | ||
266 | LUA_API const char *lua_typename (lua_State *L, int t) { | 266 | LUA_API const char *lua_typename (lua_State *L, int t) { |
267 | UNUSED(L); | 267 | (void)L; |
268 | api_check(L, LUA_TNONE <= t && t < LUA_NUMTAGS, "invalid tag"); | ||
268 | return ttypename(t); | 269 | return ttypename(t); |
269 | } | 270 | } |
270 | 271 | ||