Commit 151d9706 authored by Qball Cow's avatar Qball Cow

Commit Jat's patch for bug 1282

git-svn-id: https://svn.musicpd.org/mpd/trunk@4137 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 37c92653
......@@ -191,14 +191,14 @@ void initPlaylist() {
}
static int getNextId() {
static int cur = 0;
static int cur = -1;
while(playlist.idToPosition[cur] != -1) {
do {
cur++;
if(cur >= playlist_max_length*PLAYLIST_HASH_MULT) {
cur = 0;
}
}
} while(playlist.idToPosition[cur] != -1);
return cur;
}
......
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