diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-03-15 14:17:16 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-03-15 14:17:16 -0300 |
| commit | da81845cd5924627a3c00fca6bec683144493cbe (patch) | |
| tree | ca881e60d2a99689f9190d28774c54d5fb4f72ea | |
| parent | 9681ff09db78f0250865e576fd72e6bcadb81d0f (diff) | |
| download | lua-da81845cd5924627a3c00fca6bec683144493cbe.tar.gz lua-da81845cd5924627a3c00fca6bec683144493cbe.tar.bz2 lua-da81845cd5924627a3c00fca6bec683144493cbe.zip | |
an error may call GC and find an incomplete `ci'
| -rw-r--r-- | ldo.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -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 */ |
