diff --git a/src/song.cpp b/src/song.cpp index c82fef50..af7c32d0 100644 --- a/src/song.cpp +++ b/src/song.cpp @@ -453,7 +453,7 @@ void MPD::Song::SetHashAndSlash() if (!isStream()) { const char *tmp = strrchr(itsSong->file, '/'); - itsSlash = tmp && *(tmp-1) != '/' /* no http:// */ ? tmp-itsSong->file : std::string::npos; + itsSlash = tmp ? tmp-itsSong->file : std::string::npos; } itsHash = calc_hash(itsSong->file); }