From 06eb01a7bb8ab7ed8bb8a2f26228d62a1d2dd394 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 18 Oct 2008 14:11:09 +0000 Subject: (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. --- src/music_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v1.2.3-70-g09d2