summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/playlist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 0ac848c59c..7e8ea36543 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -74,6 +74,10 @@ char* playlist_next(int steps, int* index)
74 char dir_buf[MAX_PATH+1]; 74 char dir_buf[MAX_PATH+1];
75 char *dir_end; 75 char *dir_end;
76 76
77 if(abs(steps) > playlist.amount)
78 /* prevent madness when all files are empty/bad */
79 return NULL;
80
77 playlist.index = (playlist.index+steps) % playlist.amount; 81 playlist.index = (playlist.index+steps) % playlist.amount;
78 while ( playlist.index < 0 ) { 82 while ( playlist.index < 0 ) {
79 if ( global_settings.loop_playlist ) 83 if ( global_settings.loop_playlist )