`nlineinfo' must include end flag.

This commit is contained in:
Roberto Ierusalimschy 2000-10-10 17:51:15 -02:00
parent 46b543ebef
commit e323338fd0
1 changed files with 2 additions and 2 deletions

View File

@ -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");