From a30c789e30712f39e7a66ec9062d0d9060ac64e9 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 25 Nov 2021 23:50:11 -0800 Subject: [PATCH] unpadding capitalized hallucinatory monster names Two semi-related patches within the span of less than three days and I overlooked the overlap. When the() deals with a capitalized string, it calls CapitalMon() to check whether the string matches a monster and if so whether usage should be "the Monster" (Oracle or Olog-hai for example) or just "Monster" (Medusa). The first time that gets called, it collects all capitalized non-the Monsters from both mons[] and the bogusmon file. The latter just got changed to pad short lines, and that works fine for selecting hallucinatory monsters at random via get_rnd_text(), but non-the Monster collection processes the bogusmon file directly and wasn't updated to strip the padding. --- src/rumors.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rumors.c b/src/rumors.c index b70ced340..bd68faac0 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -785,6 +785,7 @@ init_CapMons(void) if ((endp = index(hline, '\n')) != 0) *endp = '\0'; /* strip newline */ (void) xcrypt(hline, xbuf); + (void) unpadline(xbuf); if (letter(xbuf[0])) code = '\0', startp = &xbuf[0]; /* ordinary */