diff --git a/src/library/filescanner_playlist.c b/src/library/filescanner_playlist.c index 554523e7..a94148f9 100644 --- a/src/library/filescanner_playlist.c +++ b/src/library/filescanner_playlist.c @@ -327,8 +327,8 @@ scan_playlist(const char *file, time_t mtime, int dir_id) /* For pls files we are only interested in the part after the FileX= entry */ path = NULL; - if ((pl_format == PLAYLIST_PLS) && (strncasecmp(buf, "file", strlen("file")) == 0)) - path = strchr(buf, '=') + 1; + if ((pl_format == PLAYLIST_PLS) && (strncasecmp(buf, "file", strlen("file")) == 0) && (path = strchr(buf, '='))) + path++; else if (pl_format == PLAYLIST_M3U) path = buf;