summaryrefslogtreecommitdiffstats
path: root/apps/plugins/bubbles.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-02 23:06:06 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-02 23:06:06 +0000
commit5c09d3741a9654c0f79d04a2d672e579cc7e5539 (patch)
treea0d86f4685dce4c10e4ea155eb5a9b4c49d04b60 /apps/plugins/bubbles.c
parent1015d5fd8f9e054f94c535b1ade0aec97eee2fa0 (diff)
downloadrockbox-5c09d3741a9654c0f79d04a2d672e579cc7e5539.tar.gz
rockbox-5c09d3741a9654c0f79d04a2d672e579cc7e5539.zip
Cap the level chooser to NUM_LEVELS (100) to avoid accessing level 101, which contains the secret Data Abort Bubble (which looks really funny but is not an Easter Egg). Fix a bug with loading the highest succeeded level from the highscores too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22124 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/bubbles.c')
-rw-r--r--apps/plugins/bubbles.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c
index 6126fb7fdd..d0da61f446 100644
--- a/apps/plugins/bubbles.c
+++ b/apps/plugins/bubbles.c
@@ -2185,9 +2185,9 @@ static void bubbles_loadscores(struct game_context* bb) {
for (i = 0; i < NUM_SCORES; i++)
{
- if (highscores[i].level >= highlevel)
+ if (highscores[i].level > highlevel)
{
- highlevel = highscores[i].level+1;
+ highlevel = highscores[i].level;
}
}
@@ -2392,7 +2392,7 @@ static int bubbles(struct game_context* bb) {
case 2: /* choose level */
startlevel++;
rb->set_int("Choose start level", "", UNIT_INT, &startlevel,
- NULL, 1, 1, bb->highlevel+1, NULL);
+ NULL, 1, 1, MAX(NUM_LEVELS,bb->highlevel+1), NULL);
startlevel--;
break;
case 3: /* High scores */