playlist/extm3u: strip first line for #EXTM3U detection

This commit is contained in:
Max Kellermann
2014-10-17 20:45:18 +02:00
parent bc840b69d5
commit a0fae8dacc
2 changed files with 8 additions and 2 deletions

View File

@@ -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;