Update playlist.c

This commit is contained in:
markwkidd 2016-12-07 16:07:45 -05:00 committed by GitHub
parent 72d31c6fbe
commit e65b4d8c1c

View File

@ -465,9 +465,12 @@ static bool playlist_read_file(
/* Read playlist entry and terminate string with NULL
* regardless of Windows or Unix line endings
*/
if((last = strpbrk(buf[i], "\n\r")))
*last = '\0';
*/
if(last = strrchr(buf[i], '\r'))
*last = '\0';
*last = '\0';
else if(last = strrchr(buf[i], '\n'))
*last = '\0';
}
entry = &playlist->entries[playlist->size];