diff --git a/ext/fts5/fts5_expr.c b/ext/fts5/fts5_expr.c index 0e07b9246c..f5101ba065 100644 --- a/ext/fts5/fts5_expr.c +++ b/ext/fts5/fts5_expr.c @@ -2583,6 +2583,8 @@ static char *fts5ExprPrintTcl( if( zRet==0 ) return 0; } + }else if( pExpr->eType==0 ){ + zRet = sqlite3_mprintf("{}"); }else{ char const *zOp = 0; int i; diff --git a/ext/fts5/fts5_index.c b/ext/fts5/fts5_index.c index 9d80e79e56..dd9be16e82 100644 --- a/ext/fts5/fts5_index.c +++ b/ext/fts5/fts5_index.c @@ -7815,7 +7815,7 @@ static void fts5DecodeFunction( fts5DecodeRowidList(&rc, &s, &a[4], iTermOff-4); iOff = iTermOff; - while( iOffszLeaf ){ + rc = FTS5_CORRUPT; + }else{ + fts5DecodeRowidList(&rc, &s, &a[iOff], iTermOff-iOff); + } iOff = iTermOff; if( iOff