Commit d5dcd0ed authored by Max Kellermann's avatar Max Kellermann

playlist: corrected shuffle underflow test

Check for current>=0, not queued>=0.
parent 1f8a1cbc
...@@ -1161,12 +1161,12 @@ void shufflePlaylist(void) ...@@ -1161,12 +1161,12 @@ void shufflePlaylist(void)
if (playlist.length > 1) { if (playlist.length > 1) {
if (playlist_state == PLAYLIST_STATE_PLAY) { if (playlist_state == PLAYLIST_STATE_PLAY) {
if (playlist.queued >= 0) { if (playlist.queued >= 0)
clearPlayerQueue(); clearPlayerQueue();
if (playlist.current >= 0)
/* put current playing song first */ /* put current playing song first */
swapSongs(0, playlist.order[playlist.current]); swapSongs(0, playlist.order[playlist.current]);
}
if (playlist.random) { if (playlist.random) {
int j; int j;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment