Add checking of end of line in parsing stopword list. Thanks to sharp eyes of Tom lane

REL8_3_STABLE
Teodor Sigaev 19 years ago
parent debb3aa8e9
commit 66daeb074b
  1. 2
      contrib/tsearch2/stopword.c

@ -48,7 +48,7 @@ readstoplist(text *in, StopList * s)
while (fgets(buf, sizeof(buf), hin)) while (fgets(buf, sizeof(buf), hin))
{ {
pbuf = buf; pbuf = buf;
while( !isspace( *pbuf ) ) while( *pbuf && !isspace( *pbuf ) )
pbuf++; pbuf++;
*pbuf = '\0'; *pbuf = '\0';

Loading…
Cancel
Save