mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-19 01:52:35 -05:00
Prevent negative playlist.index
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1623 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c960330ebf
commit
514a3fbbbe
1 changed files with 2 additions and 0 deletions
|
|
@ -78,6 +78,8 @@ char* playlist_next(int steps)
|
||||||
char *dir_end;
|
char *dir_end;
|
||||||
|
|
||||||
playlist.index = (playlist.index+steps) % playlist.amount;
|
playlist.index = (playlist.index+steps) % playlist.amount;
|
||||||
|
if ( playlist.index < 0 )
|
||||||
|
playlist.index = 0;
|
||||||
seek = playlist.indices[playlist.index];
|
seek = playlist.indices[playlist.index];
|
||||||
|
|
||||||
if(playlist.in_ram)
|
if(playlist.in_ram)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue