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

This commit is contained in:
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)
{
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;