diff options
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/world/Waypoints.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/features/world/Waypoints.kt b/src/main/kotlin/moe/nea/firmament/features/world/Waypoints.kt index 5d75731..b41c31a 100644 --- a/src/main/kotlin/moe/nea/firmament/features/world/Waypoints.kt +++ b/src/main/kotlin/moe/nea/firmament/features/world/Waypoints.kt @@ -256,7 +256,7 @@ fun <E> List<E>.wrappingWindow(startIndex: Int, windowSize: Int): List<E> { result.addAll(subList(startIndex, startIndex + windowSize)) } else { result.addAll(subList(startIndex, size)) - result.addAll(subList(0, minOf(size - startIndex - windowSize, startIndex))) + result.addAll(subList(0, minOf(windowSize - (size - startIndex), startIndex))) } return result } |