Skip to content

Commit 906b7e5

Browse files
committed
Fix small bug in headline generation.
Patch from Sushant Sinha <sushant354@gmail.com> http://archives.postgresql.org/pgsql-hackers/2008-07/msg00785.php
1 parent beeb356 commit 906b7e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/tsearch/wparser_def.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/tsearch/wparser_def.c,v 1.15 2008/06/17 16:09:06 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/tsearch/wparser_def.c,v 1.16 2008/10/17 17:27:46 teodor Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1621,7 +1621,7 @@ hlCover(HeadlineParsedText *prs, TSQuery query, int *p, int *q)
16211621
QueryItem *item = GETQUERY(query);
16221622
int pos = *p;
16231623

1624-
*q = 0;
1624+
*q = -1;
16251625
*p = 0x7fffffff;
16261626

16271627
for (j = 0; j < query->size; j++)
@@ -1643,7 +1643,7 @@ hlCover(HeadlineParsedText *prs, TSQuery query, int *p, int *q)
16431643
item++;
16441644
}
16451645

1646-
if (*q == 0)
1646+
if (*q < 0)
16471647
return false;
16481648

16491649
item = GETQUERY(query);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy