From f1f271ae76e626d1e6ffe71d5589d9e0d995bac1 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 10 Apr 2002 15:05:08 -0300 Subject: details --- ldo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ldo.c') diff --git a/ldo.c b/ldo.c index b0a0bd25..7df80b19 100644 --- a/ldo.c +++ b/ldo.c @@ -1,5 +1,5 @@ /* -** $Id: ldo.c,v 1.167 2002/03/25 19:45:06 roberto Exp roberto $ +** $Id: ldo.c,v 1.168 2002/03/26 20:46:10 roberto Exp roberto $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ @@ -161,6 +161,7 @@ static void luaD_callHook (lua_State *L, lua_Hook callhook, const char *event) { ar.event = event; ar.i_ci = L->ci - L->base_ci; L->ci->pc = NULL; /* function is not active */ + L->ci->top = L->ci->base; /* `top' may not have a valid value yet */ dohook(L, &ar, callhook); } } @@ -208,7 +209,7 @@ StkId luaD_precall (lua_State *L, StkId func) { LClosure *cl; if (++L->ci == L->end_ci) luaD_growCI(L); ci = L->ci; - ci->base = ci->top = func+1; /* pre-init `top' in case of errors */ + ci->base = func+1; ci->pc = NULL; if (ttype(func) != LUA_TFUNCTION) /* `func' is not a function? */ func = tryfuncTM(L, func); /* check the `function' tag method */ -- cgit v1.2.3-55-g6feb