commit 3723d790ae941dbbdb7f97484f9f2512264c54a6
parent b800c38b6920863725a279332f001bce1d457020
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue, 22 Aug 2000 17:53:08 -0300
checkstack needs a correct stack
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lvm.c b/lvm.c
@@ -1,5 +1,5 @@
/*
-** $Id: lvm.c,v 1.127 2000/08/14 14:05:06 roberto Exp roberto $
+** $Id: lvm.c,v 1.128 2000/08/22 20:49:29 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -176,6 +176,7 @@ void luaV_getglobal (lua_State *L, TString *s, StkId top) {
if (ttype(im) == TAG_NIL) /* is there a tag method? */
*top = *value; /* default behavior */
else { /* tag method */
+ L->top = top;
luaD_checkstack(L, 3);
*top = *im;
ttype(top+1) = TAG_STRING;
@@ -203,6 +204,7 @@ void luaV_setglobal (lua_State *L, TString *s, StkId top) {
}
}
else {
+ L->top = top;
luaD_checkstack(L, 3);
*(top+2) = *(top-1); /* new value */
*(top+1) = *oldvalue;