Commit 06fe442c authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fixed off-by-one error in playlist truncation.

The playlist truncation (may_tracks) was off by one.
This fixes the problem.
parent 5f77b35d
......@@ -127,6 +127,8 @@ int playlist_push_track(playlist_t *playlist, vorbis_comment *vc)
}
*cur = track;
num++; /* the extra track we just inserted */
while (playlist->max_tracks > 0 && num > playlist->max_tracks) {
playlist_track_t *to_free = playlist->first;
playlist->first = to_free->next;
......
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