mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-21 02:52:50 -05:00
Fix off-by-1 error in Bubbles level recording when you win. FS#6127. Thanks to Dave Hooper for the patch.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11252 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
320059a2ec
commit
a2a7eba72c
1 changed files with 5 additions and 2 deletions
|
|
@ -2274,6 +2274,9 @@ static void bubbles_loadscores(struct game_context* bb) {
|
||||||
/* scores are bad, reset */
|
/* scores are bad, reset */
|
||||||
rb->memset(bb->highscores, 0, sizeof(bb->highscores));
|
rb->memset(bb->highscores, 0, sizeof(bb->highscores));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( bb->highlevel >= NUM_LEVELS )
|
||||||
|
bb->highlevel = NUM_LEVELS - 1;
|
||||||
|
|
||||||
rb->close(fd);
|
rb->close(fd);
|
||||||
}
|
}
|
||||||
|
|
@ -2694,8 +2697,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
|
||||||
case BB_WIN:
|
case BB_WIN:
|
||||||
rb->splash(HZ*2, true, "You Win!");
|
rb->splash(HZ*2, true, "You Win!");
|
||||||
/* record high level */
|
/* record high level */
|
||||||
if(bb.level-1 > bb.highlevel) {
|
if( NUM_LEVELS-1 > bb.highlevel) {
|
||||||
bb.highlevel = bb.level-1;
|
bb.highlevel = NUM_LEVELS-1;
|
||||||
bb.dirty = true;
|
bb.dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue