From 444d6a106bdad894808288fc2594ff0b0eac6cba Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 27 Sep 2000 09:51:39 -0300 Subject: lua_tag should return LUA_NOTAG for non-valid indices --- lapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index e664ea43..39e052b4 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 1.98 2000/09/14 14:09:31 roberto Exp roberto $ +** $Id: lapi.c,v 1.99 2000/09/18 19:39:26 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -131,7 +131,7 @@ int lua_isnumber (lua_State *L, int index) { int lua_tag (lua_State *L, int index) { btest(L, index, ((ttype(o) == TAG_USERDATA) ? tsvalue(o)->u.d.tag : - luaT_effectivetag(L, o)), -1); + luaT_effectivetag(L, o)), LUA_NOTAG); } int lua_equal (lua_State *L, int index1, int index2) { -- cgit v1.2.3-55-g6feb