aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-09-27 09:51:39 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-09-27 09:51:39 -0300
commit444d6a106bdad894808288fc2594ff0b0eac6cba (patch)
treee073ae92a9bb2240d035e6aaec09a377e9395778
parent13635f7de7c51b26c447ce444a2c045cba83fe7c (diff)
downloadlua-444d6a106bdad894808288fc2594ff0b0eac6cba.tar.gz
lua-444d6a106bdad894808288fc2594ff0b0eac6cba.tar.bz2
lua-444d6a106bdad894808288fc2594ff0b0eac6cba.zip
lua_tag should return LUA_NOTAG for non-valid indices
-rw-r--r--bugs8
-rw-r--r--lapi.c4
2 files changed, 9 insertions, 3 deletions
diff --git a/bugs b/bugs
index c82a31d5..e10e7f60 100644
--- a/bugs
+++ b/bugs
@@ -215,5 +215,11 @@ Mon Sep 25 11:47:48 EST 2000
215 215
216** lgc.c 216** lgc.c
217Mon Sep 25 11:50:48 EST 2000 217Mon Sep 25 11:50:48 EST 2000
218>> GC may crash when checking C closures 218>> GC may crash when checking locked C closures
219(by Philip Yi; since 4.0b) 219(by Philip Yi; since 4.0b)
220
221** lapi.c
222Wed Sep 27 09:50:19 EST 2000
223>> lua_tag should return LUA_NOTAG for non-valid indices
224(by Paul Hankin; since 4.0b)
225
diff --git a/lapi.c b/lapi.c
index e664ea43..39e052b4 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 1.98 2000/09/14 14:09:31 roberto Exp roberto $ 2** $Id: lapi.c,v 1.99 2000/09/18 19:39:26 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*/
@@ -131,7 +131,7 @@ int lua_isnumber (lua_State *L, int index) {
131int lua_tag (lua_State *L, int index) { 131int lua_tag (lua_State *L, int index) {
132 btest(L, index, 132 btest(L, index,
133 ((ttype(o) == TAG_USERDATA) ? tsvalue(o)->u.d.tag : 133 ((ttype(o) == TAG_USERDATA) ? tsvalue(o)->u.d.tag :
134 luaT_effectivetag(L, o)), -1); 134 luaT_effectivetag(L, o)), LUA_NOTAG);
135} 135}
136 136
137int lua_equal (lua_State *L, int index1, int index2) { 137int lua_equal (lua_State *L, int index1, int index2) {