summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-10-18 14:11:09 +0000
committerfrosch <frosch@openttd.org>2008-10-18 14:11:09 +0000
commitf2eba8b0bf26d1f135770a1603c5d48e24ed98d9 (patch)
tree1bc2ceaa5c9ed6125a531c8b658161e72c9fcf0d /src
parent63a9ddeb77ab457b00d06936d99b0effa8f49058 (diff)
downloadopenttd-f2eba8b0bf26d1f135770a1603c5d48e24ed98d9.tar.xz
(svn r14485) -Fix (r5464): Do not check the end of destination buffer using the source pointer.
Did not cause trouble though as destination buffer has always been bigger than source buffer.
Diffstat (limited to 'src')
-rw-r--r--src/music_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/music_gui.cpp b/src/music_gui.cpp
index 9c29e7905..90f976db8 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 && i < 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) {