fix github issue #512 - fuzzer vs #exploremode
When the fuzzer is running, don't allow a randomly generated M-X keystroke to switch from debug mode to explore mode. [Unintended side-effect of the combination of two earlier changes: assigning M-X as default key for #exploremode and allowing someone in debug mode to voluntarily downgrade to explore mode (which should never impact normal play and makes some types of testing simpler).] Fixes #512
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 cmd.c $NHDT-Date: 1618175625 2021/04/11 21:13:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.463 $ */
|
/* NetHack 3.7 cmd.c $NHDT-Date: 1621377703 2021/05/18 22:41:43 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.464 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -728,6 +728,9 @@ domonability(void)
|
|||||||
int
|
int
|
||||||
enter_explore_mode(void)
|
enter_explore_mode(void)
|
||||||
{
|
{
|
||||||
|
if (iflags.debug_fuzzer)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (discover) {
|
if (discover) {
|
||||||
You("are already in explore mode.");
|
You("are already in explore mode.");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user