mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
an error may call GC and find an incomplete `ci'
This commit is contained in:
parent
9681ff09db
commit
da81845cd5
1 changed files with 2 additions and 2 deletions
4
ldo.c
4
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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue