summaryrefslogtreecommitdiff
path: root/apps/plugins
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
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')
-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) {
2185 2185
2186 for (i = 0; i < NUM_SCORES; i++) 2186 for (i = 0; i < NUM_SCORES; i++)
2187 { 2187 {
2188 if (highscores[i].level >= highlevel) 2188 if (highscores[i].level > highlevel)
2189 { 2189 {
2190 highlevel = highscores[i].level+1; 2190 highlevel = highscores[i].level;
2191 } 2191 }
2192 } 2192 }
2193 2193
@@ -2392,7 +2392,7 @@ static int bubbles(struct game_context* bb) {
2392 case 2: /* choose level */ 2392 case 2: /* choose level */
2393 startlevel++; 2393 startlevel++;
2394 rb->set_int("Choose start level", "", UNIT_INT, &startlevel, 2394 rb->set_int("Choose start level", "", UNIT_INT, &startlevel,
2395 NULL, 1, 1, bb->highlevel+1, NULL); 2395 NULL, 1, 1, MAX(NUM_LEVELS,bb->highlevel+1), NULL);
2396 startlevel--; 2396 startlevel--;
2397 break; 2397 break;
2398 case 3: /* High scores */ 2398 case 3: /* High scores */