aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-12-28 11:40:30 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-12-28 11:40:30 -0300
commit7af27ef59da4051914d93d8b63efac663b64765a (patch)
tree73ac919879b442904112dbb972412fc15983d50e /lvm.c
parent0ceada8da92135717d31a3954b5b89a954f9e71a (diff)
downloadlua-7af27ef59da4051914d93d8b63efac663b64765a.tar.gz
lua-7af27ef59da4051914d93d8b63efac663b64765a.tar.bz2
lua-7af27ef59da4051914d93d8b63efac663b64765a.zip
Cleaner handling of errors in '__close' metamethods
Instead of protecting each individual metamethod call, protect the entire call to 'luaF_close'.
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lvm.c b/lvm.c
index ccebdbe0..a6f04606 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1662,7 +1662,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1662 if (TESTARG_k(i)) { /* may there be open upvalues? */ 1662 if (TESTARG_k(i)) { /* may there be open upvalues? */
1663 if (L->top < ci->top) 1663 if (L->top < ci->top)
1664 L->top = ci->top; 1664 L->top = ci->top;
1665 luaF_close(L, base, LUA_OK); 1665 luaF_close(L, base, CLOSEKTOP);
1666 updatetrap(ci); 1666 updatetrap(ci);
1667 updatestack(ci); 1667 updatestack(ci);
1668 } 1668 }