Replaced '\r' and '\n' by 0x0d and 0x0a

This commit is contained in:
AlexeyAB 2018-01-22 19:20:58 +03:00
parent 22bf10984c
commit 7c4a78b863
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}