lua

A copy of the Lua development repository
Log | Files | Refs | README

commit fbea553ca291eb2f8a7bbd361403639af52fac96
parent 34b00c16e28c2bbc3e633b4007de956130905ed6
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue, 27 Feb 2018 17:01:28 -0300

'lua_setiuservalue' removes value from the stack even in case of error

Diffstat:
Mlapi.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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; }