From da81845cd5924627a3c00fca6bec683144493cbe Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 15 Mar 2002 14:17:16 -0300 Subject: an error may call GC and find an incomplete `ci' --- ldo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldo.c b/ldo.c index 1d468019..b6f15f52 100644 --- a/ldo.c +++ b/ldo.c @@ -1,5 +1,5 @@ /* -** $Id: ldo.c,v 1.162 2002/03/08 19:11:03 roberto Exp roberto $ +** $Id: ldo.c,v 1.163 2002/03/11 12:45:00 roberto Exp roberto $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ @@ -204,7 +204,7 @@ StkId luaD_precall (lua_State *L, StkId func) { LClosure *cl; if (++L->ci == L->end_ci) luaD_reallocCI(L, 2*L->size_ci); ci = L->ci; - ci->base = func+1; + ci->base = ci->top = func+1; /* pre-init `top' in case of errors */ 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