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:
parent
442b6ffa50
commit
5be817167b
|
@ -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++;
|
||||
|
|
Loading…
Reference in New Issue