From 514a3fbbbefad9552ff7806362e834d94bd60fd5 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Thu, 8 Aug 2002 19:10:09 +0000 Subject: Prevent negative playlist.index git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1623 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/playlist.c b/apps/playlist.c index 63bd902ae2..f4626356cb 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -78,6 +78,8 @@ char* playlist_next(int steps) char *dir_end; playlist.index = (playlist.index+steps) % playlist.amount; + if ( playlist.index < 0 ) + playlist.index = 0; seek = playlist.indices[playlist.index]; if(playlist.in_ram) -- cgit v1.2.3