diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-02-17 17:20:00 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-02-17 17:20:00 -0200 |
commit | 49dae52d0808776f5861eb33efa1d13b05e44512 (patch) | |
tree | 6f2f5578539ff00b6957522e3909293ce6de58ee /lparser.c | |
parent | 104d249ffbf76828caa5e204979f5ddad45f2bcb (diff) | |
download | lua-github-49dae52d0808776f5861eb33efa1d13b05e44512.tar.gz |
correct way to check stack space for vararg functions
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 2.176 2018/02/07 15:18:04 roberto Exp roberto $ +** $Id: lparser.c,v 2.177 2018/02/09 15:16:06 roberto Exp roberto $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -578,8 +578,6 @@ static void close_func (LexState *ls) { luaM_shrinkvector(L, f->p, f->sizep, fs->np, Proto *); luaM_shrinkvector(L, f->locvars, f->sizelocvars, fs->nlocvars, LocVar); luaM_shrinkvector(L, f->upvalues, f->sizeupvalues, fs->nups, Upvaldesc); - if (f->is_vararg) - f->maxstacksize++; /* ensure space to copy the function */ ls->fs = fs->prev; luaC_checkGC(L); } |