From 87056b8658e45197c5646daacf8c6045ab0bc016 Mon Sep 17 00:00:00 2001 From: phintuka Date: Sun, 19 Dec 2010 14:25:38 +0000 Subject: Fixed cPlaylist::Seek() forward seeking (was off by one) --- tools/playlist.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/playlist.c b/tools/playlist.c index c517bd46..e65a03c0 100644 --- a/tools/playlist.c +++ b/tools/playlist.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: playlist.c,v 1.32 2010-12-09 14:13:03 phintuka Exp $ + * $Id: playlist.c,v 1.33 2010-12-19 14:25:38 phintuka Exp $ * */ @@ -530,13 +530,14 @@ cPlaylistItem *cPlaylist::Seek(int Rel) if (!Current()) return NULL; - if (Rel > 0) + if (Rel > 0) { while (Rel--) m_Current = (cList::Next(Current()) ?: Last()); - if (Rel < 0) + } else if (Rel < 0) { while (Rel++) m_Current = (cList::Prev(Current()) ?: First()); + } return Current(); } -- cgit v1.2.3