1
0
Fork 0

(svn r2767) -Fix: fixed potential mem-leak

release/0.4.5
truelight 2005-07-31 17:18:43 +00:00
parent 11a70c5e91
commit ed2f5d02c8
1 changed files with 3 additions and 3 deletions

View File

@ -130,12 +130,12 @@ static void DoStopMusic(void)
static void SelectSongToPlay(void) static void SelectSongToPlay(void)
{ {
int i = 0; uint i = 0;
memset(_cur_playlist, 0, sizeof(_cur_playlist));
do { do {
_cur_playlist[i] = _playlists[msf.playlist][i]; _cur_playlist[i] = _playlists[msf.playlist][i];
} while ( _cur_playlist[i++] != 0); } while (_playlists[msf.playlist][i++] != 0 && i < lengthof(_cur_playlist) - 1);
memset(_cur_playlist + i, 0, 33 - i);
if (msf.shuffle) { if (msf.shuffle) {
i = 500; i = 500;