commit e323338fd09216069d1290ec099ac987aadb036b
parent 46b543ebef302ddb70cee59bb47ca542828de1d2
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue, 10 Oct 2000 17:50:53 -0200
`nlineinfo' must include end flag.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git 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");