summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-11-05 07:43:39 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-11-05 07:43:39 +0000
commit319d5f71011321053ba41775182543c534da9913 (patch)
treea6b08d859186e0671b5f4b8066080c5fcb313413 /firmware
parentb109e9305495e9a76137fca359aa363f4a2860fc (diff)
new_file() now correctly bails out if all files in the playlist are corrupt. This fixes bug report #1060753.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5383 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/mpeg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 37539ff036..2ad708d6d7 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -860,10 +860,6 @@ static int new_file(int steps)
steps--;
else
steps++;
-
- /* Bail out if no file could be opened */
- if(abs(steps) > max_steps)
- return -1;
}
else
{
@@ -895,6 +891,10 @@ static int new_file(int steps)
}
}
+
+ /* Bail out if no file could be opened */
+ if(abs(steps) > max_steps)
+ return -1;
} while ( mpeg_file < 0 );
return 0;