From e65b4d8c1c4581d7f4a38ed92dcfd508cd46128f Mon Sep 17 00:00:00 2001 From: markwkidd Date: Wed, 7 Dec 2016 16:07:45 -0500 Subject: [PATCH] Update playlist.c --- playlist.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/playlist.c b/playlist.c index 0de4958c7c..43a33078e9 100644 --- a/playlist.c +++ b/playlist.c @@ -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];