OP_TFORLOOP uses extra stack space

This commit is contained in:
Roberto Ierusalimschy
2002-12-11 10:34:22 -02:00
parent 9e8face8d8
commit 73517e86b0
4 changed files with 8 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ldebug.c,v 1.141 2002/12/04 17:38:31 roberto Exp roberto $
** $Id: ldebug.c,v 1.142 2002/12/06 17:15:35 roberto Exp roberto $
** Debug Interface
** See Copyright Notice in lua.h
*/
@@ -364,7 +364,7 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) {
break;
}
case OP_TFORLOOP:
checkreg(pt, a+2+c);
checkreg(pt, a+c+5);
if (reg >= a) last = pc; /* affect all registers above base */
/* go through */
case OP_FORLOOP: