diff options
Diffstat (limited to 'music_gui.c')
-rw-r--r-- | music_gui.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/music_gui.c b/music_gui.c index 61a364ff2..f7136e34c 100644 --- a/music_gui.c +++ b/music_gui.c @@ -130,12 +130,12 @@ static void DoStopMusic(void) static void SelectSongToPlay(void) { - int i = 0; + uint i = 0; + memset(_cur_playlist, 0, sizeof(_cur_playlist)); do { _cur_playlist[i] = _playlists[msf.playlist][i]; - } while ( _cur_playlist[i++] != 0); - memset(_cur_playlist + i, 0, 33 - i); + } while (_playlists[msf.playlist][i++] != 0 && i < lengthof(_cur_playlist) - 1); if (msf.shuffle) { i = 500; |