bug fix for deleting a song when the last song or next to last song is playing and causing playlist.current to be set to -1

git-svn-id: https://svn.musicpd.org/mpd/trunk@1479 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes 2004-06-14 15:29:55 +00:00
parent 77f824ce20
commit 17c13ea0e8

View File

@ -767,12 +767,12 @@ int deleteFromPlaylist(FILE * fp, int song) {
playlist_noGoToNext = 1; playlist_noGoToNext = 1;
} }
if(playlist.current>=playlist.length) { if(playlist.current>songOrder) {
incrPlaylistCurrent();
}
else if(playlist.current>songOrder) {
playlist.current--; playlist.current--;
} }
else if(playlist.current>=playlist.length) {
incrPlaylistCurrent();
}
if(playlist.queued>songOrder) { if(playlist.queued>songOrder) {
playlist.queued--; playlist.queued--;