From 7c4a78b86301f780b938f3366bc75232acb1603e Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Mon, 22 Jan 2018 19:20:58 +0300 Subject: [PATCH] Replaced '\r' and '\n' by 0x0d and 0x0a --- src/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.c b/src/utils.c index db6e0c64..d6bdbf60 100644 --- a/src/utils.c +++ b/src/utils.c @@ -286,8 +286,8 @@ 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'; + if(line[curr-2] == 0x0d) line[curr-2] = 0x00; + if(line[curr-1] == 0x0a) line[curr-1] = 0x00; return line; }