diff --git a/NucleicRemote/NucleicRemote/Views/Transcript/IncrementalTranscriptProjection.swift b/NucleicRemote/NucleicRemote/Views/Transcript/IncrementalTranscriptProjection.swift index 54a2ec6..7f76c9d 100644 --- a/NucleicRemote/NucleicRemote/Views/Transcript/IncrementalTranscriptProjection.swift +++ b/NucleicRemote/NucleicRemote/Views/Transcript/IncrementalTranscriptProjection.swift @@ -310,9 +310,11 @@ final class IncrementalTranscriptProjection { var runningMaxLast = -1 var best = 0 - for w in 1...min(cap, n - edgeLag) where w >= 1 { - runningMaxLast = max(runningMaxLast, maxLastAtFirst[w - 1]) - if separatorOK[w - 1] && runningMaxLast < w { best = w } + if cap >= 1 { + for w in 1...cap { + runningMaxLast = max(runningMaxLast, maxLastAtFirst[w - 1]) + if separatorOK[w - 1] && runningMaxLast < w { best = w } + } } return start + best }