]> granicus.if.org Git - nethack/commitdiff
'O' couldn't change 'symset'
authorPatR <rankin@nethack.org>
Thu, 13 Aug 2020 22:24:24 +0000 (15:24 -0700)
committerPatR <rankin@nethack.org>
Thu, 13 Aug 2020 22:24:24 +0000 (15:24 -0700)
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
src/options.c

index a6a0b83e181ec8ba9cc93f26b28832e973f73355..e6831805a9a0d2225a92abb6d2c07a27201f62f3 100644 (file)
@@ -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
index 6ff7859a4541beda9c9220d983e34a5c572b242a..236e04ff5bca00f9c7168131a12858bf4d03298c 100644 (file)
@@ -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;
 }