Add checking of end of line in parsing stopword list. Thanks to sharp eyes of Tom...
authorTeodor Sigaev <teodor@sigaev.ru>
Mon, 26 Mar 2007 13:57:07 +0000 (13:57 +0000)
committerTeodor Sigaev <teodor@sigaev.ru>
Mon, 26 Mar 2007 13:57:07 +0000 (13:57 +0000)
contrib/tsearch2/stopword.c

index 582932e84be669235147e6790d98f9e1929a01a2..2165bb68ddc4ce05b2fb00e89425e5d49f004db0 100644 (file)
@@ -48,7 +48,7 @@ readstoplist(text *in, StopList * s)
        while (fgets(buf, sizeof(buf), hin))
        {
            pbuf = buf;
-           while( !isspace( *pbuf ) )
+           while( *pbuf && !isspace( *pbuf ) )
                pbuf++;
            *pbuf = '\0';