Fix text mode dependency
This commit is contained in:
parent
d6fd9f0cc1
commit
e07ed18105
|
@ -107,7 +107,9 @@ static char *getaline(RFILE *file)
|
||||||
newline = newline_tmp;
|
newline = newline_tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
newline[idx++] = in;
|
/* ignore MS line endings */
|
||||||
|
if (in != '\r')
|
||||||
|
newline[idx++] = in;
|
||||||
in = filestream_getc(file);
|
in = filestream_getc(file);
|
||||||
}
|
}
|
||||||
newline[idx] = '\0';
|
newline[idx] = '\0';
|
||||||
|
|
|
@ -519,10 +519,10 @@ static bool playlist_read_file(
|
||||||
/* Read playlist entry and terminate string with NUL character
|
/* Read playlist entry and terminate string with NUL character
|
||||||
* regardless of Windows or Unix line endings
|
* regardless of Windows or Unix line endings
|
||||||
*/
|
*/
|
||||||
if((last = strrchr(buf[i], '\r')))
|
if((last = strrchr(buf[i], '\r')))
|
||||||
*last = '\0';
|
*last = '\0';
|
||||||
else if((last = strrchr(buf[i], '\n')))
|
else if((last = strrchr(buf[i], '\n')))
|
||||||
*last = '\0';
|
*last = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
entry = &playlist->entries[playlist->size];
|
entry = &playlist->entries[playlist->size];
|
||||||
|
|
Loading…
Reference in New Issue