[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] tracklist: fix off-by-one when adding track
From: |
Eric Wong |
Subject: |
[PATCH 1/3] tracklist: fix off-by-one when adding track |
Date: |
Thu, 10 Oct 2013 10:51:02 +0000 |
Otherwise we end up going past the end of the list.
---
lib/dtas/tracklist.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/dtas/tracklist.rb b/lib/dtas/tracklist.rb
index b6f02c3..ef60915 100644
--- a/lib/dtas/tracklist.rb
+++ b/lib/dtas/tracklist.rb
@@ -94,7 +94,7 @@ class DTAS::Tracklist # :nodoc:
if set_as_current
@pos = idx + 1
else
- @pos += 1 if @pos >= idx
+ @pos += 1 if @pos > idx
end
else # nil = first_track
@list.unshift(track)
--
1.8.4
- [PATCH 1/3] tracklist: fix off-by-one when adding track,
Eric Wong <=