diff options
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/playlist.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 0ac848c..7e8ea36 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -74,6 +74,10 @@ char* playlist_next(int steps, int* index) char dir_buf[MAX_PATH+1]; char *dir_end; + if(abs(steps) > playlist.amount) + /* prevent madness when all files are empty/bad */ + return NULL; + playlist.index = (playlist.index+steps) % playlist.amount; while ( playlist.index < 0 ) { if ( global_settings.loop_playlist ) |