Skip to content

Commit 7a7810d

Browse files
committed
Fix IndexOutOfBoundsException
1 parent a1b2258 commit 7a7810d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

music/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
subprojects {
2-
version = "3.5.16-SNAPSHOT"
2+
version = "3.5.17-SNAPSHOT"
33
}

music/player/src/main/kotlin/dev/schlaubi/mikmusic/player/Queue.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Queue(private var tracksList: MutableList<QueuedTrack> = mutableListOf())
1212
order = LinkedList(order.shuffled())
1313
} else {
1414
val queue = order.subList(0, nextIndex)
15-
val shuffled = order.subList(nextIndex.coerceAtMost(order.lastIndex), tracksList.size)
15+
val shuffled = order.subList(nextIndex.coerceAtMost(order.lastIndex), order.size)
1616
val unShuffled = queue + shuffled.sorted()
1717

1818
nextIndex = tracksList.size

0 commit comments

Comments
 (0)