diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 62ee66195..4ccd13961 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1346,13 +1346,13 @@ bool CAudioPlayerGui::openFilebrowser(void) while (infile.good()) { infile.getline(cLine, 255); - // remove CR - if (cLine[strlen(cLine)-1]=='\r') - cLine[strlen(cLine)-1]=0; int duration; sscanf(cLine, "#EXTINF:%d,%[^\n]\n", &duration, name); if (strlen(cLine) > 0 && cLine[0]!='#') { + // remove CR + if (cLine[strlen(cLine)-1]=='\r') + cLine[strlen(cLine)-1]=0; char *url = strstr(cLine, "http://"); if (url != NULL) { if (strstr(url, ".m3u") || strstr(url, ".pls"))