diff --git a/contrib/tsearch2/wparser_def.c b/contrib/tsearch2/wparser_def.c index b20909ce5b..f1f168de90 100644 --- a/contrib/tsearch2/wparser_def.c +++ b/contrib/tsearch2/wparser_def.c @@ -110,7 +110,7 @@ hlCover(HLPRSTEXT * prs, QUERYTYPE * query, int *p, int *q) ITEM *item = GETQUERY(query); int pos = *p; - *q = 0; + *q = -1; *p = 0x7fffffff; for (j = 0; j < query->size; j++) @@ -132,7 +132,7 @@ hlCover(HLPRSTEXT * prs, QUERYTYPE * query, int *p, int *q) item++; } - if (*q == 0) + if (*q < 0) return false; item = GETQUERY(query);