From fbea553ca291eb2f8a7bbd361403639af52fac96 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 27 Feb 2018 17:01:55 -0300 Subject: 'lua_setiuservalue' removes value from the stack even in case of error --- lapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lapi.c b/lapi.c index 7ecf68cb..eb872df8 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.288 2018/02/26 14:16:05 roberto Exp roberto $ +** $Id: lapi.c,v 2.289 2018/02/27 17:48:28 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -953,9 +953,9 @@ LUA_API int lua_setiuservalue (lua_State *L, int idx, int n) { else { setobj(L, &uvalue(o)->uv[n - 1].uv, s2v(L->top - 1)); luaC_barrierback(L, gcvalue(o), s2v(L->top - 1)); - L->top--; res = 1; } + L->top--; lua_unlock(L); return res; } -- cgit v1.2.3-55-g6feb