From 5c09d3741a9654c0f79d04a2d672e579cc7e5539 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 2 Aug 2009 23:06:06 +0000 Subject: 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 --- apps/plugins/bubbles.c | 6 +++--- 1 file 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 */ -- cgit v1.2.3