1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04: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:
Philipp Schafft 2015-03-28 17:33:09 +00:00
parent 5f77b35d14
commit 06fe442c2d

View File

@ -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;