servlist: skip empty lines.

Fixes #1999
This commit is contained in:
Mark Jansen 2017-05-28 12:46:26 +02:00 committed by TingPing
parent ad359d7a04
commit 0dccd8d373

View File

@ -1005,6 +1005,8 @@ servlist_load (void)
while (fgets (buf, sizeof (buf) - 2, fp))
{
len = strlen (buf);
if (!len)
continue;
buf[len] = 0;
buf[len-1] = 0; /* remove the trailing \n */
if (net)