aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-17 17:20:00 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-17 17:20:00 -0200
commit49dae52d0808776f5861eb33efa1d13b05e44512 (patch)
tree6f2f5578539ff00b6957522e3909293ce6de58ee /lparser.c
parent104d249ffbf76828caa5e204979f5ddad45f2bcb (diff)
downloadlua-49dae52d0808776f5861eb33efa1d13b05e44512.tar.gz
lua-49dae52d0808776f5861eb33efa1d13b05e44512.tar.bz2
lua-49dae52d0808776f5861eb33efa1d13b05e44512.zip
correct way to check stack space for vararg functions
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lparser.c b/lparser.c
index 802c64bd..da27c472 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.176 2018/02/07 15:18:04 roberto Exp roberto $ 2** $Id: lparser.c,v 2.177 2018/02/09 15:16:06 roberto Exp roberto $
3** Lua Parser 3** Lua Parser
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -578,8 +578,6 @@ static void close_func (LexState *ls) {
578 luaM_shrinkvector(L, f->p, f->sizep, fs->np, Proto *); 578 luaM_shrinkvector(L, f->p, f->sizep, fs->np, Proto *);
579 luaM_shrinkvector(L, f->locvars, f->sizelocvars, fs->nlocvars, LocVar); 579 luaM_shrinkvector(L, f->locvars, f->sizelocvars, fs->nlocvars, LocVar);
580 luaM_shrinkvector(L, f->upvalues, f->sizeupvalues, fs->nups, Upvaldesc); 580 luaM_shrinkvector(L, f->upvalues, f->sizeupvalues, fs->nups, Upvaldesc);
581 if (f->is_vararg)
582 f->maxstacksize++; /* ensure space to copy the function */
583 ls->fs = fs->prev; 581 ls->fs = fs->prev;
584 luaC_checkGC(L); 582 luaC_checkGC(L);
585} 583}