aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--NEWS6
-rw-r--r--src/playlist.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 1326154fe..ba0574a8b 100644
--- a/NEWS
+++ b/NEWS
@@ -15,8 +15,10 @@ MPD 0.14.1 - not yet released
* configure.ac: check for pkg-config before using it
* fix minor memory leak in decoder_tag()
* fix cross-fading bug: it used to play some chunks of the new song twice
-* playlist: fix assertion failure during playlist load
-* playlist: implement Fisher-Yates shuffle properly
+* playlist
+ - fix assertion failure during playlist load
+ - implement Fisher-Yates shuffle properly
+ - safely search the playlist for deleted song
* use custom PRNG for volume dithering (speedup)
* detect libid3tag without pkg-config
diff --git a/src/playlist.c b/src/playlist.c
index 96eff0a6f..1d2fb7306 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -743,7 +743,7 @@ deleteASongFromPlaylist(const struct song *song)
if (NULL == playlist.songs)
return;
- for (unsigned i = 0; i < playlist.length; i++)
+ for (int i = playlist.length - 1; i >= 0; --i)
if (song == playlist.songs[i])
deleteFromPlaylist(i);