diff options
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 1.96 2001/12/18 20:52:30 roberto Exp $ | 2 | ** $Id: ldebug.c,v 1.97 2002/01/09 22:02:47 roberto Exp $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -350,7 +350,7 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) { | |||
350 | if (a == reg) last = pc; /* change register `a' */ | 350 | if (a == reg) last = pc; /* change register `a' */ |
351 | } | 351 | } |
352 | if (testOpMode(op, OpModeT)) | 352 | if (testOpMode(op, OpModeT)) |
353 | check(GET_OPCODE(pt->code[pc+1]) == OP_CJMP); | 353 | check(pc+2 < pt->sizecode); /* check skip */ |
354 | switch (op) { | 354 | switch (op) { |
355 | case OP_LOADBOOL: { | 355 | case OP_LOADBOOL: { |
356 | check(c == 0 || pc+2 < pt->sizecode); /* check its jump */ | 356 | check(c == 0 || pc+2 < pt->sizecode); /* check its jump */ |
@@ -381,8 +381,7 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) { | |||
381 | check(c < MAXSTACK && b < c); | 381 | check(c < MAXSTACK && b < c); |
382 | break; | 382 | break; |
383 | } | 383 | } |
384 | case OP_JMP: | 384 | case OP_JMP: { |
385 | case OP_CJMP: { | ||
386 | int dest = pc+1+b; | 385 | int dest = pc+1+b; |
387 | check(0 <= dest && dest < pt->sizecode); | 386 | check(0 <= dest && dest < pt->sizecode); |
388 | /* not full check and jump is forward and do not skip `lastpc'? */ | 387 | /* not full check and jump is forward and do not skip `lastpc'? */ |