Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 8672da3

Browse files
committed
Final CI failure?
1 parent 192c290 commit 8672da3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/System.Linq/tests/SkipLastTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void EvaluationBehavior(int count)
4747
// As an example, if Enumerable.Range(1, 6).SkipLast(2) is called, then we should read in the first 3 items,
4848
// yield 1, read in 4, yield 2, and so on.
4949
int index = 0;
50-
int limit = count * 2;
50+
int limit = Math.Max(0, count * 2);
5151

5252
var source = new DelegateIterator<int>(
5353
moveNext: () => index++ != limit, // Stop once we go past the limit.

0 commit comments

Comments
 (0)