aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist/plugins
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-10-17 20:45:18 +0200
committerMax Kellermann <max@duempel.org>2014-10-17 20:45:18 +0200
commita0fae8dacc3361374990973e1a9d9e4d8961d360 (patch)
tree6456e34cd464c7a55e0e66a8e250e16c7ca6306b /src/playlist/plugins
parentbc840b69d51538f966d8d4800cb0ab460169971c (diff)
downloadmpd-a0fae8dacc3361374990973e1a9d9e4d8961d360.tar.gz
mpd-a0fae8dacc3361374990973e1a9d9e4d8961d360.tar.xz
mpd-a0fae8dacc3361374990973e1a9d9e4d8961d360.zip
playlist/extm3u: strip first line for #EXTM3U detection
Diffstat (limited to 'src/playlist/plugins')
-rw-r--r--src/playlist/plugins/ExtM3uPlaylistPlugin.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx b/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
index b459696f1..fdd4357ca 100644
--- a/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
+++ b/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
@@ -39,8 +39,12 @@ public:
}
bool CheckFirstLine() {
- const char *line = tis.ReadLine();
- return line != nullptr && strcmp(line, "#EXTM3U") == 0;
+ char *line = tis.ReadLine();
+ if (line == nullptr)
+ return false;
+
+ StripRight(line);
+ return strcmp(line, "#EXTM3U") == 0;
}
virtual DetachedSong *NextSong() override;