Skip to content

Commit

Permalink
Fix IndexOutOfBoundsException
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Mar 17, 2024
1 parent a1b2258 commit 7a7810d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion music/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
subprojects {
version = "3.5.16-SNAPSHOT"
version = "3.5.17-SNAPSHOT"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Queue(private var tracksList: MutableList<QueuedTrack> = mutableListOf())
order = LinkedList(order.shuffled())
} else {
val queue = order.subList(0, nextIndex)
val shuffled = order.subList(nextIndex.coerceAtMost(order.lastIndex), tracksList.size)
val shuffled = order.subList(nextIndex.coerceAtMost(order.lastIndex), order.size)
val unShuffled = queue + shuffled.sorted()

nextIndex = tracksList.size
Expand Down

0 comments on commit 7a7810d

Please sign in to comment.