aboutsummaryrefslogtreecommitdiff
path: root/ext/fts5/fts5_index.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fts5/fts5_index.c')
-rw-r--r--ext/fts5/fts5_index.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fts5/fts5_index.c b/ext/fts5/fts5_index.c
index f33617465..5e1155c2a 100644
--- a/ext/fts5/fts5_index.c
+++ b/ext/fts5/fts5_index.c
@@ -2321,11 +2321,11 @@ static void fts5LeafSeek(
}
search_success:
- pIter->iLeafOffset = iOff + nNew;
- if( pIter->iLeafOffset>n || nNew<1 ){
+ if( (i64)iOff+nNew>n || nNew<1 ){
p->rc = FTS5_CORRUPT;
return;
}
+ pIter->iLeafOffset = iOff + nNew;
pIter->iTermLeafOffset = pIter->iLeafOffset;
pIter->iTermLeafPgno = pIter->iLeafPgno;