'O' vs bouldersym

The 'O' handling for bouldersym was updating the display value for
boulder even if the value had been rejected, and if it still had the
default of '\0', the map would end up with <NUL> characters.  (When
examined via '//' or ';', those matched dummy monster class #0 and
led to the impossible "Alphabet soup: 'an("")'" that was suppressed
yesterday.)

Attempting to set bouldersym to ^@ or \0 would also be rejected as
duplicating a monster symbol.  That is now accepted and used to reset
the boulder symbol to default.  However, other control characters are
also accepted--not due to this patch, they already are, and from a
config file in addition to via 'O'--so bouldersym can still disrupt
the map.  But that's no different from putting control characters
into a symbol set or setting them from config file via S_foo:^C.
This commit is contained in:
PatR
2018-12-30 15:30:38 -08:00
parent 83e8033f72
commit da40f55a9f
4 changed files with 31 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 display.h $NHDT-Date: 1525012585 2018/04/29 14:36:25 $ $NHDT-Branch: master $:$NHDT-Revision: 1.28 $ */
/* NetHack 3.6 display.h $NHDT-Date: 1546212620 2018/12/30 23:30:20 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.29 $ */
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
/* and Dave Cohrs, 1990. */
/* NetHack may be freely redistributed. See license for details. */
@@ -257,6 +257,8 @@
*
* warning A set of six representing the different warning levels.
*
* statue One for each monster. Count: NUMMONS
*
* The following are offsets used to convert to and from a glyph.
*/
#define NUM_ZAP 8 /* number of zap beam types */