summaryrefslogtreecommitdiff
path: root/src/library/scalax/collection/generic/covartest/VectorTemplate.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scalax/collection/generic/covartest/VectorTemplate.scala')
-rw-r--r--src/library/scalax/collection/generic/covartest/VectorTemplate.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scalax/collection/generic/covartest/VectorTemplate.scala b/src/library/scalax/collection/generic/covartest/VectorTemplate.scala
index 6e44b6a6c5..474fb9ad7e 100644
--- a/src/library/scalax/collection/generic/covartest/VectorTemplate.scala
+++ b/src/library/scalax/collection/generic/covartest/VectorTemplate.scala
@@ -34,7 +34,7 @@ self =>
x
} else Iterator.empty.next
def head =
- self(i)
+ if (i < end) self(i) else Iterator.empty.next
/** drop is overridden to enable fast searching in the middle of random access sequences */
override def drop(n: Int): Iterator[A] =
if (n > 0) new Elements(start + n, end) else this