From 3723d790ae941dbbdb7f97484f9f2512264c54a6 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 22 Aug 2000 17:53:30 -0300 Subject: [PATCH] checkstack needs a correct stack --- lvm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lvm.c b/lvm.c index e5148905..ed85e74c 100644 --- 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;