aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-03-15 14:17:16 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-03-15 14:17:16 -0300
commitda81845cd5924627a3c00fca6bec683144493cbe (patch)
treeca881e60d2a99689f9190d28774c54d5fb4f72ea
parent9681ff09db78f0250865e576fd72e6bcadb81d0f (diff)
downloadlua-da81845cd5924627a3c00fca6bec683144493cbe.tar.gz
lua-da81845cd5924627a3c00fca6bec683144493cbe.tar.bz2
lua-da81845cd5924627a3c00fca6bec683144493cbe.zip
an error may call GC and find an incomplete `ci'
-rw-r--r--ldo.c4
1 files 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 @@
1/* 1/*
2** $Id: ldo.c,v 1.162 2002/03/08 19:11:03 roberto Exp roberto $ 2** $Id: ldo.c,v 1.163 2002/03/11 12:45:00 roberto Exp roberto $
3** Stack and Call structure of Lua 3** Stack and Call structure of Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -204,7 +204,7 @@ StkId luaD_precall (lua_State *L, StkId func) {
204 LClosure *cl; 204 LClosure *cl;
205 if (++L->ci == L->end_ci) luaD_reallocCI(L, 2*L->size_ci); 205 if (++L->ci == L->end_ci) luaD_reallocCI(L, 2*L->size_ci);
206 ci = L->ci; 206 ci = L->ci;
207 ci->base = func+1; 207 ci->base = ci->top = func+1; /* pre-init `top' in case of errors */
208 ci->pc = NULL; 208 ci->pc = NULL;
209 if (ttype(func) != LUA_TFUNCTION) /* `func' is not a function? */ 209 if (ttype(func) != LUA_TFUNCTION) /* `func' is not a function? */
210 func = tryfuncTM(L, func); /* check the `function' tag method */ 210 func = tryfuncTM(L, func); /* check the `function' tag method */