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.zip rockbox-514a3fbbbefad9552ff7806362e834d94bd60fd5.tar.gz rockbox-514a3fbbbefad9552ff7806362e834d94bd60fd5.tar.bz2 rockbox-514a3fbbbefad9552ff7806362e834d94bd60fd5.tar.xz | |
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 63bd902..f462635 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) |