mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-11 00:34:27 +00:00
(svn r23033) -Fix [FS#4776]: the last custom playlist items went lost when the files in the .obm are not contiguous
This commit is contained in:
parent
a78f38fdc0
commit
f04746a9ff
@ -84,7 +84,8 @@ static byte * const _playlists[] = {
|
||||
void ValidatePlaylist(byte *playlist)
|
||||
{
|
||||
while (*playlist != 0) {
|
||||
if (*playlist <= BaseMusic::GetUsedSet()->num_available) {
|
||||
/* Song indices are saved off-by-one so 0 is "nothing". */
|
||||
if (*playlist <= NUM_SONGS_AVAILABLE && !StrEmpty(GetSongName(*playlist - 1))) {
|
||||
playlist++;
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user