From 6d04537ea660fd12fc16c328366b701fabaf4919 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 29 Nov 2018 16:02:44 -0200 Subject: A to-be-closed variable must have a closable value (or be nil) It is an error for a to-be-closed variable to have a non-closable non-nil value when it is being closed. This situation does not seem to be useful and often hints to an error. (Particularly in the C API, it is easy to change a to-be-closed index by mistake.) --- lapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index 147ed0ff..9cabe7ca 100644 --- a/lapi.c +++ b/lapi.c @@ -1299,7 +1299,7 @@ static const char *aux_upvalue (TValue *fi, int n, TValue **val, *val = f->upvals[n-1]->v; if (owner) *owner = obj2gco(f->upvals[n - 1]); name = p->upvalues[n-1].name; - return (name == NULL) ? "(*no name)" : getstr(name); + return (name == NULL) ? "(no name)" : getstr(name); } default: return NULL; /* not a closure */ } -- cgit v1.2.3-55-g6feb