aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 03c3b78ae..32378381e 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -592,7 +592,7 @@ static int codeEqualityTerm(
if( i==iEq ){
pIn->iCur = iTab;
pIn->eEndLoopOp = bRev ? OP_PrevIfOpen : OP_NextIfOpen;
- if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 ){
+ if( iEq>0 && (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 ){
pIn->iBase = iReg - i;
pIn->nPrefix = i;
pLoop->wsFlags |= WHERE_IN_EARLYOUT;