diff --git a/playlist.c b/playlist.c index 84631fd290..d1548df98d 100644 --- a/playlist.c +++ b/playlist.c @@ -466,10 +466,8 @@ static bool playlist_read_file( /* Read playlist entry regardless * of Windows or Unix line endings */ - if(last = strrchr(buf[i], '\r')) + if((last = strpbrk(buf[i], "\n\r"))) *last = '\0'; - else if(last = strrchr(buf[i], '\n')) - *last = '\0'; } entry = &playlist->entries[playlist->size];