aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-22 20:10:17 +0100
committerMax Kellermann <max@duempel.org>2009-01-22 20:10:17 +0100
commitd5dcd0ed668781b311375715f761f67c07442291 (patch)
tree947d1a26a7dfd8278be85096454d22dcbd1bda17 /src/playlist.c
parent1f8a1cbc08c87369583e57d44ee165b40346b7cf (diff)
downloadmpd-d5dcd0ed668781b311375715f761f67c07442291.tar.gz
mpd-d5dcd0ed668781b311375715f761f67c07442291.tar.xz
mpd-d5dcd0ed668781b311375715f761f67c07442291.zip
playlist: corrected shuffle underflow test
Check for current>=0, not queued>=0.
Diffstat (limited to 'src/playlist.c')
-rw-r--r--src/playlist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 99d1a1c69..fbb959fed 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1161,12 +1161,12 @@ void shufflePlaylist(void)
if (playlist.length > 1) {
if (playlist_state == PLAYLIST_STATE_PLAY) {
- if (playlist.queued >= 0) {
+ if (playlist.queued >= 0)
clearPlayerQueue();
+ if (playlist.current >= 0)
/* put current playing song first */
swapSongs(0, playlist.order[playlist.current]);
- }
if (playlist.random) {
int j;