From aaf1d4d381651d44d6b748ce93a2de1d96d5e6d1 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 13 Aug 2020 15:24:24 -0700 Subject: [PATCH] 'O' couldn't change 'symset' The revised options processing from however long ago broke using 'O' to change 'symset'. ('roguesymset' worked ok.) Picking it in the main 'O' menu behaved as it nothing had been picked. The symset-specific submenu wasn't offered to the player because a two-line block of code was omitted. It seems amazing that no one has noticed in all this time. --- doc/fixes37.0 | 3 ++- src/options.c | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index a6a0b83e1..e6831805a 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.283 $ $NHDT-Date: 1597182932 2020/08/11 21:55:32 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.284 $ $NHDT-Date: 1597357458 2020/08/13 22:24:18 $ General Fixes and Modified Features ----------------------------------- @@ -322,6 +322,7 @@ the fix to make worm visibility checks work as intended forced the coordinates the worm instead of leaving it off the map; place_worm_tail_randomly() reverses the segments and can throw some away if there isn't room, but throwing away the extra segment removed the worm from the map +using 'O' to try to change 'symset' was a no-op; 'roguesymset' worked curses: 'msg_window' option wasn't functional for curses unless the binary also included tty support diff --git a/src/options.c b/src/options.c index 6ff7859a4..236e04ff5 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 options.c $NHDT-Date: 1596494520 2020/08/03 22:42:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.469 $ */ +/* NetHack 3.7 options.c $NHDT-Date: 1597357458 2020/08/13 22:24:18 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.470 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -359,14 +359,12 @@ boolean tinitial, tfrom_file; got_match = TRUE; } } - -#if 0 +#if 0 /* this prevents "boolopt:True" &c */ if (!got_match) { if (has_val && !allopt[i].valok) continue; } #endif - /* * During option initialization, the function * determine_ambiguities() @@ -692,8 +690,7 @@ char *op UNUSED; #ifdef BACKWARD_COMPAT /* if ((opts = string_for_env_opt(allopt[optidx].name, opts, FALSE)) - == - empty_optstr) + == empty_optstr) */ if ((opts = string_for_opt(opts, FALSE)) == empty_optstr) return FALSE; @@ -3493,6 +3490,9 @@ char *op; Strcat(opts, ", active"); return optn_ok; } + if (req == do_handler) { + return handler_symset(optidx); + } return optn_ok; }