Reset to the start of the playlist when we've reached the end of it, don't move past the end first. This addresses bug #11879 in part (by preventing it even further from occuring).

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5333 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-06-25 20:15:20 +00:00
parent 9bf7563e4b
commit bc810ca2e2
1 changed files with 4 additions and 1 deletions

View File

@ -142,10 +142,13 @@ const char* PlayList_CurrentSong()
const char* PlayList_NextSong()
{
if (currentSong)
// If there's a next song in the playlist select it
if (currentSong
&& currentSong->next)
{
currentSong = currentSong->next;
}
// Otherwise jump to the start of the playlist
else
{
currentSong = songList;