From e323338fd09216069d1290ec099ac987aadb036b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 10 Oct 2000 17:51:15 -0200 Subject: [PATCH] `nlineinfo' must include end flag. --- lparser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lparser.c b/lparser.c index e85b4cde..20cfad38 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 1.113 2000/09/27 17:41:58 roberto Exp roberto $ +** $Id: lparser.c,v 1.114 2000/09/29 12:42:13 roberto Exp roberto $ ** LL(1) Parser and code generator for Lua ** See Copyright Notice in lua.h */ @@ -337,7 +337,7 @@ static void close_func (LexState *ls) { removelocalvars(ls, fs->nactloc); luaM_reallocvector(L, f->locvars, f->nlocvars, LocVar); luaM_reallocvector(L, f->lineinfo, f->nlineinfo+1, int); - f->lineinfo[f->nlineinfo] = MAX_INT; /* end flag */ + f->lineinfo[f->nlineinfo++] = MAX_INT; /* end flag */ luaF_protook(L, f, fs->pc); /* proto is ok now */ ls->fs = fs->prev; LUA_ASSERT(fs->bl == NULL, "wrong list end");