1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Allow the P2 operand to be negative on opcodes that are not jumps. (CVS 4680)

FossilOrigin-Name: 717bcd11a222fe100e25c5b2eb6de8b6b9930de1
This commit is contained in:
drh
2008-01-04 19:33:49 +00:00
parent 4aeb7bf778
commit d298151587
3 changed files with 11 additions and 10 deletions

View File

@@ -300,9 +300,10 @@ static void resolveP2Values(Vdbe *p, int *pMaxFuncArgs, int *pMaxStack){
nMaxStack--;
}
if( pOp->p2>=0 ) continue;
assert( -1-pOp->p2<p->nLabel );
pOp->p2 = aLabel[-1-pOp->p2];
if( sqlite3VdbeOpcodeHasProperty(opcode, OPFLG_JUMP) && pOp->p2<0 ){
assert( -1-pOp->p2<p->nLabel );
pOp->p2 = aLabel[-1-pOp->p2];
}
}
sqlite3_free(p->aLabel);
p->aLabel = 0;