aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lapi.c b/lapi.c
index 50b738ce..bb9927d9 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.60 2007/04/17 13:19:53 roberto Exp roberto $ 2** $Id: lapi.c,v 2.61 2007/08/07 16:53:40 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -733,7 +733,7 @@ LUA_API int lua_setfenv (lua_State *L, int idx) {
733 res = 0; 733 res = 0;
734 break; 734 break;
735 } 735 }
736 luaC_objbarrier(L, gcvalue(o), hvalue(L->top - 1)); 736 if (res) luaC_objbarrier(L, gcvalue(o), hvalue(L->top - 1));
737 L->top--; 737 L->top--;
738 lua_unlock(L); 738 lua_unlock(L);
739 return res; 739 return res;