aboutsummaryrefslogtreecommitdiff
path: root/lfunc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-05-24 15:54:54 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-05-24 15:54:54 -0300
commitbe0d951be86ae7628ec22bb8b4b75870c21817ff (patch)
treef37a286abcd9988aa0e345c1b109d4652f178f4a /lfunc.c
parenta9dbc2d64129d54379192b240623b41d8705a465 (diff)
downloadlua-be0d951be86ae7628ec22bb8b4b75870c21817ff.tar.gz
lua-be0d951be86ae7628ec22bb8b4b75870c21817ff.tar.bz2
lua-be0d951be86ae7628ec22bb8b4b75870c21817ff.zip
bug: cannot reuse a dying upvalue
Diffstat (limited to 'lfunc.c')
-rw-r--r--lfunc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lfunc.c b/lfunc.c
index 5c6ebd27..e84538c9 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lfunc.c,v 2.47 2017/04/11 18:41:09 roberto Exp roberto $ 2** $Id: lfunc.c,v 2.48 2017/04/30 20:43:26 roberto Exp roberto $
3** Auxiliary functions to manipulate prototypes and closures 3** Auxiliary functions to manipulate prototypes and closures
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -63,7 +63,7 @@ UpVal *luaF_findupval (lua_State *L, StkId level) {
63 lua_assert(isintwups(L) || L->openupval == NULL); 63 lua_assert(isintwups(L) || L->openupval == NULL);
64 while ((p = *pp) != NULL && p->v >= level) { 64 while ((p = *pp) != NULL && p->v >= level) {
65 lua_assert(upisopen(p)); 65 lua_assert(upisopen(p));
66 if (p->v == level) /* found a corresponding upvalue? */ 66 if (p->v == level && !isdead(G(L), p)) /* corresponding upvalue? */
67 return p; /* return it */ 67 return p; /* return it */
68 pp = &p->u.open.next; 68 pp = &p->u.open.next;
69 } 69 }