diff --git a/src/utils.c b/src/utils.c index f340a7e0..db6e0c64 100644 --- a/src/utils.c +++ b/src/utils.c @@ -286,6 +286,7 @@ char *fgetl(FILE *fp) fgets(&line[curr], readsize, fp); curr = strlen(line); } + if(line[curr-2] == '\r') line[curr-2] = '\0'; if(line[curr-1] == '\n') line[curr-1] = '\0'; return line;