summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-07-24 18:28:28 +0100
committerAidan MacDonald <amachronic@protonmail.com>2021-08-04 19:04:37 +0000
commitbdd9c8dfc8abc7b066334820bd93e4394571a46b (patch)
tree17e6de03aa493074b2dd25e2273b83e0d08199ce /apps/plugins
parent005c414e5f2a0ace3756da767d3920ac98cb5c76 (diff)
plugins: Fix issues in 2048
One of these was an unintentional fallthrough -- if you said no to 'quit without saving' it would save and quit. Change-Id: I33828b58962a05adab65ac5f71dd0e2b1e07001b
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/2048.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/plugins/2048.c b/apps/plugins/2048.c
index 1604b73c62..2633753071 100644
--- a/apps/plugins/2048.c
+++ b/apps/plugins/2048.c
@@ -811,8 +811,7 @@ static int do_2048_pause_menu(void)
"Help",
"Quit without Saving",
"Quit");
- bool quit = false;
- while(!quit)
+ while(1)
{
switch(rb->do_menu(&menu, &sel, NULL, false))
{
@@ -849,9 +848,10 @@ static int do_2048_pause_menu(void)
}
case 6:
return 3;
+ default:
+ break;
}
}
- return 0;
}
static void exit_handler(void)
@@ -1017,8 +1017,7 @@ static enum plugin_status do_2048_menu(void)
"Help",
"Quit without Saving",
"Quit");
- bool quit = false;
- while(!quit)
+ while(true)
{
switch(rb->do_menu(&menu, &sel, NULL, false))
{
@@ -1065,6 +1064,7 @@ static enum plugin_status do_2048_menu(void)
case 5:
if(confirm_quit())
return PLUGIN_OK;
+ break;
case 6:
if(loaded)
save_game();
@@ -1073,7 +1073,6 @@ static enum plugin_status do_2048_menu(void)
break;
}
}
- return PLUGIN_OK;
}
/* plugin entry point */