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.
This commit is contained in:
PatR
2021-11-25 23:50:11 -08:00
parent 59beebcbcc
commit a30c789e30

View File

@@ -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 */