From 8b2b8790b5c419282f4fa0c7faa168379647b3b9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 5 Aug 2002 15:45:45 -0300 Subject: small bug: basic `ci' must have a valid func (base - 1) --- lstate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lstate.c') diff --git a/lstate.c b/lstate.c index 17d45f5f..1f1c73fe 100644 --- a/lstate.c +++ b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 1.99 2002/07/16 14:26:56 roberto Exp roberto $ +** $Id: lstate.c,v 1.100 2002/08/05 17:36:24 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -42,6 +42,7 @@ static void stack_init (lua_State *L, lua_State *OL) { L->base_ci = luaM_newvector(OL, BASIC_CI_SIZE, CallInfo); L->ci = L->base_ci; L->ci->pc = NULL; /* not a Lua function */ + setnilvalue(L->top++); /* `function' entry for this `ci' */ L->ci->base = L->top; L->ci->top = L->top + LUA_MINSTACK; L->size_ci = BASIC_CI_SIZE; -- cgit v1.2.3-55-g6feb