Commit Jat's patch for bug 1282
git-svn-id: https://svn.musicpd.org/mpd/trunk@4137 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
37c9265357
commit
151d9706e9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user