summaryrefslogtreecommitdiff
path: root/src/ldebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ldebug.c')
-rw-r--r--src/ldebug.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ldebug.c b/src/ldebug.c
index 5ca62ebf..6986bf0f 100644
--- a/src/ldebug.c
+++ b/src/ldebug.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldebug.c,v 2.109 2014/12/10 11:30:09 roberto Exp $
+** $Id: ldebug.c,v 2.110 2015/01/02 12:52:22 roberto Exp $
** Debug Interface
** See Copyright Notice in lua.h
*/
@@ -167,9 +167,10 @@ LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) {
StkId pos = 0; /* to avoid warnings */
const char *name = findlocal(L, ar->i_ci, n, &pos);
lua_lock(L);
- if (name)
+ if (name) {
setobjs2s(L, pos, L->top - 1);
- L->top--; /* pop value */
+ L->top--; /* pop value */
+ }
lua_unlock(L);
return name;
}