-/* NetHack 3.7 options.c $NHDT-Date: 1643491546 2022/01/29 21:25:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.535 $ */
+/* NetHack 3.7 options.c $NHDT-Date: 1644531493 2022/02/10 22:18:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.538 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2008. */
/* NetHack may be freely redistributed. See license for details. */
any = cg.zeroany;
for (i = 0; i < SIZE(npchoices); i++) {
any.a_int = i + 1;
- add_menu(tmpwin, &nul_glyphinfo, &any, 'a' + i,
- 0, ATR_NONE, npchoices[i], MENU_ITEMFLAGS_NONE);
+ add_menu(tmpwin, &nul_glyphinfo, &any, 'a' + i, '0' + i,
+ ATR_NONE, npchoices[i], MENU_ITEMFLAGS_NONE);
}
end_menu(tmpwin, "Select number_pad mode:");
if (select_menu(tmpwin, PICK_ONE, &mode_pick) > 0) {
-/* NetHack 3.7 winmenu.c $NHDT-Date: 1615911117 2021/03/16 16:11:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.48 $ */
+/* NetHack 3.7 winmenu.c $NHDT-Date: 1644531504 2022/02/10 22:18:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.50 $ */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */
}
; /* accept */
} else if (digit(ch)) {
- /* special case: '0' is also the default ball class */
- if (ch == '0' && !menu_info->counting
+ /* special case: '0' is also the default ball class;
+ some menus use digits as potential group accelerators
+ but their entries don't rely on counts */
+ if (!menu_info->counting
&& index(menu_info->curr_menu.gacc, ch))
goto group_accel;
menu_info->menu_count *= 10L;
-/* NetHack 3.7 wintty.c $NHDT-Date: 1643491577 2022/01/29 21:26:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.282 $ */
+/* NetHack 3.7 wintty.c $NHDT-Date: 1644531502 2022/02/10 22:18:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.283 $ */
/* Copyright (c) David Cohrs, 1991 */
/* NetHack may be freely redistributed. See license for details. */
switch (morc) {
case '0':
- /* special case: '0' is also the default ball class */
- if (!counting && index(gacc, morc))
- goto group_accel;
- /* fall through to count the zero */
- /*FALLTHRU*/
case '1':
case '2':
case '3':
case '7':
case '8':
case '9':
+ /* special case: '0' is also the default ball class;
+ some menus use digits as potential group accelerators
+ but their entries don't rely on counts */
+ if (!counting && index(gacc, morc))
+ goto group_accel;
+
count = (count * 10L) + (long) (morc - '0');
/*
* It is debatable whether we should allow 0 to