Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 66daeb0

Browse files
committed
Add checking of end of line in parsing stopword list. Thanks to sharp eyes of Tom lane
1 parent debb3aa commit 66daeb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/tsearch2/stopword.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ readstoplist(text *in, StopList * s)
4848
while (fgets(buf, sizeof(buf), hin))
4949
{
5050
pbuf = buf;
51-
while( !isspace( *pbuf ) )
51+
while( *pbuf && !isspace( *pbuf ) )
5252
pbuf++;
5353
*pbuf = '\0';
5454

0 commit comments

Comments
 (0)