Keep line number for KPRI to KNIL optimization.

This commit is contained in:
Mike Pall 2013-01-31 12:36:23 +01:00
parent f772bed34b
commit 4eb4b8ab84

View File

@ -481,8 +481,8 @@ static void bcemit_nil(FuncState *fs, BCReg from, BCReg n)
} else { } else {
break; break;
} }
fs->pc--; /* Drop KPRI. */ *ip = BCINS_AD(BC_KNIL, from, from+n-1); /* Replace KPRI. */
break; return;
case BC_KNIL: case BC_KNIL:
pto = bc_d(*ip); pto = bc_d(*ip);
if (pfrom <= from && from <= pto+1) { /* Can we connect both ranges? */ if (pfrom <= from && from <= pto+1) { /* Can we connect both ranges? */