-$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.114 $ $NHDT-Date: 1583073988 2020/03/01 14:46:28 $
+$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.115 $ $NHDT-Date: 1583102142 2020/03/01 22:35:42 $
General Fixes and Modified Features
-----------------------------------
have ^X provide more information when held or swallowed
avoid divide by 0 crash if 'bogusmon' (file of bogus monster types) is empty
display wasn't updating immediately after toggling hilite_pet option
+randomly choosing role could lead to crash via segfault
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
-/* NetHack 3.6 role.c $NHDT-Date: 1578947634 2020/01/13 20:33:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.68 $ */
+/* NetHack 3.6 role.c $NHDT-Date: 1583102142 2020/03/01 22:35:42 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.69 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
/* this doesn't rule out impossible combinations but attempts to
honor all the filter masks */
- for (i = 0; i < SIZE(roles); ++i)
+ for (i = 0; i < SIZE(roles) - 1; ++i) /* -1: avoid terminating element */
if (ok_role(i, ROLE_NONE, ROLE_NONE, ROLE_NONE)
&& ok_race(i, ROLE_RANDOM, ROLE_NONE, ROLE_NONE)
&& ok_gend(i, ROLE_NONE, ROLE_RANDOM, ROLE_NONE)
* 1 - The Rogue Leader is the Tourist Nemesis.
* 2 - Priests start with a random alignment - convert the leader and
* guardians here.
- * 3 - Priests also get their of deities from a randomly chosen role.
+ * 3 - Priests also get their set of deities from a randomly chosen role.
* 4 - [obsolete] Elves can have one of two different leaders,
* but can't work it out here because it requires hacking the
* level file data (see sp_lev.c).