Skip '\r' when reading lines from a file

This commit is contained in:
Holger Vogt 2019-09-06 22:41:52 +02:00
parent 8fc1b70e93
commit f9deefe326
1 changed files with 2 additions and 0 deletions

View File

@ -1404,6 +1404,8 @@ static char *readline(FILE *fd)
if (strlen == 0 && (c == '\t' || c == ' ')) /* Leading spaces away */
continue;
if (c == '\r')
continue;
strptr[strlen++] = (char) c;
if (strlen >= memlen) {