aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lvm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lvm.c b/lvm.c
index c15385a4..1a21a116 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 1.114 2000/06/08 17:48:31 roberto Exp roberto $ 2** $Id: lvm.c,v 1.115 2000/06/12 13:52:05 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -180,8 +180,10 @@ void luaV_setglobal (lua_State *L, TString *s, StkId top) {
180 const TObject *oldvalue = luaH_getstr(L->gt, s); 180 const TObject *oldvalue = luaH_getstr(L->gt, s);
181 const TObject *im = luaT_getimbyObj(L, oldvalue, IM_SETGLOBAL); 181 const TObject *im = luaT_getimbyObj(L, oldvalue, IM_SETGLOBAL);
182 if (ttype(im) == TAG_NIL) { /* is there a tag method? */ 182 if (ttype(im) == TAG_NIL) { /* is there a tag method? */
183 if (oldvalue != &luaO_nilobject) 183 if (oldvalue != &luaO_nilobject) {
184 /* cast to remove `const' is OK, because `oldvalue' != luaO_nilobject */
184 *(TObject *)oldvalue = *(top-1); 185 *(TObject *)oldvalue = *(top-1);
186 }
185 else { 187 else {
186 TObject key; 188 TObject key;
187 ttype(&key) = TAG_STRING; 189 ttype(&key) = TAG_STRING;