diff --git a/contrib/tsearch2/stopword.c b/contrib/tsearch2/stopword.c index 582932e84be669235147e6790d98f9e1929a01a2..2165bb68ddc4ce05b2fb00e89425e5d49f004db0 100644 --- a/contrib/tsearch2/stopword.c +++ b/contrib/tsearch2/stopword.c @@ -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';