(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:
rubidium 2011-10-16 19:53:02 +00:00
parent a78f38fdc0
commit f04746a9ff
1 changed files with 2 additions and 1 deletions

View File

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