From 9fd28fb8526d382fee25f0deef9fe941e018314f Mon Sep 17 00:00:00 2001 From: Tangles Date: Sat, 29 Dec 2018 01:32:45 +1100 Subject: [PATCH 1/2] curses - fix count selection not working for PICK_ONE menus. eg: d2b would drop 2 of item b, but using d* to pick from a menu and then selecting 2b would ignore the count and just drop the whole stack. --- win/curses/cursdial.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/win/curses/cursdial.c b/win/curses/cursdial.c index a6e3d3a3e..57efba990 100644 --- a/win/curses/cursdial.c +++ b/win/curses/cursdial.c @@ -1143,6 +1143,7 @@ menu_get_selections(WINDOW * win, nhmenu *menu, int how) curpage = menu_operation(win, menu, INVERT, 0); break; } + /* FallThrough */ default: if (isdigit(curletter)) { count = curses_get_count(curletter - '0'); @@ -1255,6 +1256,8 @@ menu_get_selections(WINDOW * win, nhmenu *menu, int how) if (how == PICK_ONE) { menu_clear_selections(menu); menu_select_deselect(win, menu_item_ptr, SELECT); + if (count) + menu_item_ptr->count = count; num_selected = 1; dismiss = TRUE; break; From a5f154d9258148202f1b1afc7c92845603c8e4e8 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 28 Dec 2018 10:08:56 -0500 Subject: [PATCH 2/2] a couple of source spelling consistencies for /*FALLTHRU*/ --- src/apply.c | 2 +- win/curses/cursdial.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apply.c b/src/apply.c index edb3940e6..dbde93fba 100644 --- a/src/apply.c +++ b/src/apply.c @@ -3228,7 +3228,7 @@ struct obj *obj; (void) thitmonst(mtmp, uwep); return 1; } - /* FALL THROUGH */ + /*FALLTHRU*/ case 3: /* Surface */ if (IS_AIR(levl[cc.x][cc.y].typ) || is_pool(cc.x, cc.y)) pline_The("hook slices through the %s.", surface(cc.x, cc.y)); diff --git a/win/curses/cursdial.c b/win/curses/cursdial.c index 57efba990..fd41e64ce 100644 --- a/win/curses/cursdial.c +++ b/win/curses/cursdial.c @@ -1143,7 +1143,7 @@ menu_get_selections(WINDOW * win, nhmenu *menu, int how) curpage = menu_operation(win, menu, INVERT, 0); break; } - /* FallThrough */ + /*FALLTHRU*/ default: if (isdigit(curletter)) { count = curses_get_count(curletter - '0');