summaryrefslogtreecommitdiff
path: root/src/audio/track_queue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/track_queue.cpp')
-rw-r--r--src/audio/track_queue.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/audio/track_queue.cpp b/src/audio/track_queue.cpp
index 7e08e3a2..6bab60e7 100644
--- a/src/audio/track_queue.cpp
+++ b/src/audio/track_queue.cpp
@@ -200,9 +200,12 @@ auto TrackQueue::next() -> void {
shuffle_->next();
pos_ = shuffle_->current();
} else {
- pos_++;
- if (pos_ >= tracks_.size() && repeat_) {
- pos_ = 0;
+ if (pos_ + 1 >= tracks_.size()) {
+ if (repeat_) {
+ pos_ = 0;
+ }
+ } else {
+ pos_++;
}
}