Skip to content

Commit 1b2cd96

Browse files
committed
Fix an index bug
1 parent f1f5762 commit 1b2cd96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/AsyncAlgorithms/CombineLatest/CombineLatestManyStateMachine.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ struct CombineLatestManyStateMachine<Element: Sendable, Failure: Error>: Sendabl
312312
// One of the upstreams finished.
313313

314314
self.state = .modifying
315-
upstreams[0].isFinished = true
315+
upstreams[baseIndex].isFinished = true
316316

317317
if upstreams.allSatisfy(\.isFinished) {
318318
// All upstreams finished we can transition to either finished or upstreamsFinished now

0 commit comments

Comments
 (0)