From 9880c0ed7ae050a5b39b245e4aa947e187d0d609 Mon Sep 17 00:00:00 2001 From: Recrown Date: Mon, 15 Jan 2018 16:58:23 -0600 Subject: [PATCH] fixed out of bound issue with music list --- .../rhythmbullet/desktop/audio/MusicListController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicListController.java b/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicListController.java index 0e6043c..6f047b6 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicListController.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/audio/MusicListController.java @@ -126,9 +126,9 @@ public class MusicListController extends Observable implements OnCompletionListe mm.dispose(); } if (currentPlaybackID < 0) { - currentPlaybackID = musicList.getTotal(); + currentPlaybackID = musicList.getTotal()-1; } - if (currentPlaybackID > musicList.getTotal()) { + if (currentPlaybackID >= musicList.getTotal()) { currentPlaybackID = 0; } this.mm = musicList.getMusicInfoFromIndex(currentPlaybackID);