From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 6 Dec 2011 14:28:19 +0100 Subject: [PATCH] Parser may collect a prototype while building it. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Comes from http://www.lua.org/bugs.html#5.1.4-11 reported by Ingo van Lil on 13 Oct 2011. Signed-off-by: BenoƮt Burnichon --- src/lparser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/lparser.c b/src/lparser.c index 1e2a9a8..a2721d2 100644 --- a/src/lparser.c +++ b/src/lparser.c @@ -374,9 +374,9 @@ static void close_func (LexState *ls) { lua_assert(luaG_checkcode(f)); lua_assert(fs->bl == NULL); ls->fs = fs->prev; - L->top -= 2; /* remove table and prototype from the stack */ /* last token read was anchored in defunct function; must reanchor it */ if (fs) anchor_token(ls); + L->top -= 2; /* remove table and prototype from the stack */ }