Changeset - r18194:52bd93508478
[Not reviewed]
master
0 1 0
rubidium - 13 years ago 2011-10-16 19:53:02
rubidium@openttd.org
(svn r23033) -Fix [FS#4776]: the last custom playlist items went lost when the files in the .obm are not contiguous
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/music_gui.cpp
Show inline comments
 
@@ -81,13 +81,14 @@ static byte * const _playlists[] = {
 
 * Validate a playlist.
 
 * @param playlist the playlist to validate
 
 */
 
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;
 
		}
 
		for (byte *p = playlist; *p != 0; p++) {
 
			p[0] = p[1];
 
		}
0 comments (0 inline, 0 general)