diff options
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 1.111 2002/05/02 13:06:20 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.112 2002/05/07 17:36:56 roberto Exp roberto $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -270,8 +270,7 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) { | |||
270 | int pc; | 270 | int pc; |
271 | int last; /* stores position of last instruction that changed `reg' */ | 271 | int last; /* stores position of last instruction that changed `reg' */ |
272 | last = pt->sizecode-1; /* points to final return (a `neutral' instruction) */ | 272 | last = pt->sizecode-1; /* points to final return (a `neutral' instruction) */ |
273 | if (reg == NO_REG) /* full check? */ | 273 | check(precheck(pt)); |
274 | check(precheck(pt)); | ||
275 | for (pc = 0; pc < lastpc; pc++) { | 274 | for (pc = 0; pc < lastpc; pc++) { |
276 | const Instruction i = pt->code[pc]; | 275 | const Instruction i = pt->code[pc]; |
277 | OpCode op = GET_OPCODE(i); | 276 | OpCode op = GET_OPCODE(i); |
@@ -303,8 +302,10 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) { | |||
303 | if (testOpMode(op, OpModesetA)) { | 302 | if (testOpMode(op, OpModesetA)) { |
304 | if (a == reg) last = pc; /* change register `a' */ | 303 | if (a == reg) last = pc; /* change register `a' */ |
305 | } | 304 | } |
306 | if (testOpMode(op, OpModeT)) | 305 | if (testOpMode(op, OpModeT)) { |
307 | check(pc+2 < pt->sizecode); /* check skip */ | 306 | check(pc+2 < pt->sizecode); /* check skip */ |
307 | check(GET_OPCODE(pt->code[pc+1]) == OP_JMP); | ||
308 | } | ||
308 | switch (op) { | 309 | switch (op) { |
309 | case OP_LOADBOOL: { | 310 | case OP_LOADBOOL: { |
310 | check(c == 0 || pc+2 < pt->sizecode); /* check its jump */ | 311 | check(c == 0 || pc+2 < pt->sizecode); /* check its jump */ |