diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-08-08 19:10:09 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-08-08 19:10:09 +0000 |
commit | 514a3fbbbefad9552ff7806362e834d94bd60fd5 (patch) | |
tree | 59170e4ab0819c6ed34331f9da6f39bb795531ad | |
parent | c960330ebf7fdb9e223f8d0f4991a211a31e9386 (diff) | |
download | rockbox-514a3fbbbefad9552ff7806362e834d94bd60fd5.tar.gz rockbox-514a3fbbbefad9552ff7806362e834d94bd60fd5.zip |
Prevent negative playlist.index
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1623 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/playlist.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) | |||
78 | char *dir_end; | 78 | char *dir_end; |
79 | 79 | ||
80 | playlist.index = (playlist.index+steps) % playlist.amount; | 80 | playlist.index = (playlist.index+steps) % playlist.amount; |
81 | if ( playlist.index < 0 ) | ||
82 | playlist.index = 0; | ||
81 | seek = playlist.indices[playlist.index]; | 83 | seek = playlist.indices[playlist.index]; |
82 | 84 | ||
83 | if(playlist.in_ram) | 85 | if(playlist.in_ram) |