commit 18d3e82cfef08b60cba316dccb8f0830d311b439
parent 2a4afb97c8a3f64dccad86fa848855616ea2c254
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue, 3 Jul 2001 14:01:12 -0300
check C is independent from check B
Diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/ldebug.c b/ldebug.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldebug.c,v 1.85 2001/06/28 14:57:17 roberto Exp roberto $
+** $Id: ldebug.c,v 1.86 2001/06/28 19:58:57 roberto Exp roberto $
** Debug Interface
** See Copyright Notice in lua.h
*/
@@ -354,11 +354,11 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) {
case iABC: {
b = GETARG_B(i);
c = GETARG_C(i);
- if (testOpMode(op, OpModeBreg)) {
+ if (testOpMode(op, OpModeBreg))
checkreg(pt, b);
+ if (testOpMode(op, OpModeCreg))
check(c < pt->maxstacksize ||
(c >= MAXSTACK && c-MAXSTACK < pt->sizek));
- }
break;
}
case iABc: {
@@ -397,7 +397,8 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) {
break;
}
case OP_CONCAT: {
- check(b < c); /* at least two operands */
+ /* `c' is a register, and at least two operands */
+ check(c < MAXSTACK && b < c);
break;
}
case OP_JMP: