ocarina: Return index of searched track

And not the index of the current iterator.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2012-09-06 12:02:15 -04:00
parent 442b6ffa50
commit 5be817167b
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ namespace libsaria
list<Track *>::iterator it;
unsigned int index = 0;
for (it = plist.begin(); it != cur; it++) {
for (it = plist.begin(); it != plist.end(); it++) {
if (*it == track)
return index;
index++;