diff --git a/server/src/msg.c b/server/src/msg.c index cd9e7ea04..c8371b45e 100644 --- a/server/src/msg.c +++ b/server/src/msg.c @@ -93,7 +93,9 @@ int msg_fscan(FILE *f, struct msg *m, int *fl, double *off) skip: if (fgets(line, sizeof(line), f) == NULL) return -1; /* An error occured */ - if (line[0] == '#') + /* Skip whitespaces, empty and comment lines */ + for (ptr = line; isblank(*ptr); ptr++); + if (*ptr == '\0' || *ptr == '#') goto skip; /* Mandatory: seconds */