mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
Fixed off-by-one error in playlist truncation.
The playlist truncation (may_tracks) was off by one. This fixes the problem.
This commit is contained in:
parent
5f77b35d14
commit
06fe442c2d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user