lib: fix `Sequence::first_index_of`
authorJean Privat <jean@pryen.org>
Sat, 10 May 2014 19:01:02 +0000 (15:01 -0400)
committerJean Privat <jean@pryen.org>
Sat, 10 May 2014 19:01:02 +0000 (15:01 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

lib/standard/collection/abstract_collection.nit

index a08f7d4..d67d80e 100644 (file)
@@ -624,7 +624,7 @@ interface SequenceRead[E]
                var p = 0
                var i = iterator
                while i.is_ok do
-                       if p>pos and i.item == item then return i.index
+                       if p>=pos and i.item == item then return i.index
                        i.next
                        p += 1
                end