From b73837a4358d60509b62dfd3e6e508cb53a17ea8 Mon Sep 17 00:00:00 2001 From: Dmitrivm Date: Fri, 17 Nov 2017 12:43:02 +0300 Subject: [PATCH] Update utils.c Add compatibility for Windows style text files with #13 #10 end of line (\r\n) --- src/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils.c b/src/utils.c index 9f1af1df..3e8ca739 100644 --- a/src/utils.c +++ b/src/utils.c @@ -356,6 +356,7 @@ char *fgetl(FILE *fp) curr = strlen(line); } if(line[curr-1] == '\n') line[curr-1] = '\0'; + if(line[curr-1] == '\r') line[curr-1] = '\0'; return line; }