mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Merge pull request #15 from ZoiteChat/Fix-channel-config-line-endings
Refactor newline handling in servlist.c
This commit is contained in:
@@ -990,11 +990,10 @@ servlist_load (void)
|
||||
|
||||
while (fgets (buf, sizeof (buf) - 2, fp))
|
||||
{
|
||||
g_strchomp (buf);
|
||||
len = strlen (buf);
|
||||
if (!len)
|
||||
continue;
|
||||
buf[len] = 0;
|
||||
buf[len-1] = 0; /* remove the trailing \n */
|
||||
if (net)
|
||||
{
|
||||
switch (buf[0])
|
||||
|
||||
Reference in New Issue
Block a user