src/config.c
changeset 47 a689b6a8e6ed
parent 36 6889aacd038e
child 51 5d9aed3948a6
--- a/src/config.c
+++ b/src/config.c
@@ -46,7 +46,8 @@
     uc->port = 6667;
 
     while (!feof (f)) {
-        (void)fgets (buffer, sizeof (buffer), f);
+        if (fgets (buffer, sizeof (buffer), f) == NULL)
+            break;
         token = buffer;
 
         while (*token == '\t')  /* Eat trailing tabs */