# HG changeset patch # User Matti Hamalainen # Date 1127471584 0 # Node ID ce140fff14c70c0860ae56acdae1fb77a70259a1 # Parent a0fe42c5b6f42dbfdedd786735e6849e0e1408f7 Off by one caused infinite looping in searching for next sub-tune to play, fixed. diff -r a0fe42c5b6f4 -r ce140fff14c7 src/xmms-sid.c --- a/src/xmms-sid.c Fri Sep 23 09:34:02 2005 +0000 +++ b/src/xmms-sid.c Fri Sep 23 10:33:04 2005 +0000 @@ -366,7 +366,7 @@ XSDEBUG("tune #%i already played, finding next match ...\n", myStatus.currSong); isFound = FALSE; i = 0; - while (!isFound && (i <= myTune->nsubTunes)) + while (!isFound && (++i <= myTune->nsubTunes)) { if (xs_cfg.subAutoMinOnly) { @@ -378,9 +378,6 @@ if (!playedTune[i]) isFound = TRUE; } - - /* currSong = i + 1 anyway, so we get it free here */ - i++; } if (isFound)