mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-01 07:38:38 +00:00
accept playlists with Unix and Windows style line endings
This commit is contained in:
parent
91dd0756dd
commit
a49912c863
@ -463,9 +463,13 @@ static bool playlist_read_file(
|
||||
if (!filestream_gets(file, buf[i], sizeof(buf[i])))
|
||||
goto end;
|
||||
|
||||
last = strrchr(buf[i], '\n');
|
||||
if (last)
|
||||
/* Read playlist entry regardless
|
||||
* of Windows or Unix line endings
|
||||
*/
|
||||
if(last = strrchr(buf[i], '\r'))
|
||||
*last = '\0';
|
||||
else if(last = strrchr(buf[i], '\n'))
|
||||
*last = '\0';
|
||||
}
|
||||
|
||||
entry = &playlist->entries[playlist->size];
|
||||
|
Loading…
Reference in New Issue
Block a user