diff options
author | rubidium <rubidium@openttd.org> | 2009-01-03 17:10:20 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-03 17:10:20 +0000 |
commit | ca4b7b2046bbeef9d30f3dedafe8276016b15b21 (patch) | |
tree | 92f56ce3dcf0698e8284490a10fd88b1599fb890 /src | |
parent | 7b29620e0c9b7cbb29ff27cada1633887b7c0756 (diff) | |
download | openttd-ca4b7b2046bbeef9d30f3dedafe8276016b15b21.tar.xz |
(svn r14811) -Fix: off-by-one causing possible out-of-bounds reads.
Diffstat (limited to 'src')
-rw-r--r-- | src/music_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/music_gui.cpp b/src/music_gui.cpp index d81fb41d3..d92477279 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -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) { |