1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 08:29:11 +00:00

(svn r14811) -Fix: off-by-one causing possible out-of-bounds reads.

This commit is contained in:
rubidium
2009-01-03 17:10:20 +00:00
parent 099022224f
commit 6512d717e1

View File

@@ -118,7 +118,7 @@ static void SelectSongToPlay()
_cur_playlist[j] = _playlists[msf.playlist][i];
j++;
}
} while (_playlists[msf.playlist][i++] != 0 && j < lengthof(_cur_playlist) - 1);
} while (_playlists[msf.playlist][++i] != 0 && j < lengthof(_cur_playlist) - 1);
/* Do not shuffle when on the intro-start window, as the song to play has to be the original TTD Theme*/
if (msf.shuffle && _game_mode != GM_MENU) {