Skip '\r' when reading lines from a file
This commit is contained in:
parent
8fc1b70e93
commit
f9deefe326
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue