summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-02-22 21:24:06 +0100
committerGravatar waker <wakeroid@gmail.com>2011-02-22 21:24:06 +0100
commit61aba93922708d9d2bcb3d69d5b69c6e53f13d52 (patch)
treed995f43a9797c540d9b6c54fa562b10484407f29
parent032a570c72570ee7105a5d0c9c21093b2e9b67cc (diff)
set playlist tail to point to the last track after sort
-rw-r--r--playlist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/playlist.c b/playlist.c
index 6be4d4bb..0f74e36a 100644
--- a/playlist.c
+++ b/playlist.c
@@ -3118,6 +3118,9 @@ pl_sort (int iter, int id, const char *format, int ascending) {
}
prev = it;
}
+
+ playlist->tail[iter] = array[playlist->count[iter]-1];
+
free (array);
struct timeval tm2;