fix bug in mon.c reported by paxed

Also adds a shorthand macro
    monsym(&mons[n])
for getting the default symbol, used in the bugfix.
This commit is contained in:
nhmall
2023-12-06 22:18:11 -05:00
parent c1910026f0
commit ee3ebcc10d
5 changed files with 5 additions and 4 deletions

View File

@@ -4419,7 +4419,7 @@ pick_animal(void)
/* rogue level should use monsters represented by uppercase letters
only, but since chameleons aren't generated there (not uppercase!)
we don't perform a lot of retries */
if (Is_rogue_level(&u.uz) && !isupper((uchar) mons[res].mlet))
if (Is_rogue_level(&u.uz) && !isupper(monsym(&mons[res])))
res = ga.animal_list[rn2(ga.animal_list_count)];
return res;
}