diff --git a/src/parser.c b/src/parser.c index da7487b0..b0ee1fb2 100644 --- a/src/parser.c +++ b/src/parser.c @@ -778,6 +778,7 @@ list *read_cfg(char *filename) while((line=fgetl(file)) != 0){ ++ nu; strip(line); + line[ strcspn(line, "\r\n") ] = '\0'; switch(line[0]){ case '[': current = malloc(sizeof(section));