fix crash when using ';' to look at I monsters
Reported to the mailing list. If you set your monster symbol options, and use ';' and select a known invisible monster by screen, a crash would occur accessing a null pointer.
This commit is contained in:
@@ -531,7 +531,8 @@ do_look(quick)
|
||||
|
||||
/* Check for monsters */
|
||||
for (i = 0; i < MAXMCLASSES; i++) {
|
||||
if (sym == (from_screen ? monsyms[i] : def_monsyms[i])) {
|
||||
if (sym == (from_screen ? monsyms[i] : def_monsyms[i]) &&
|
||||
monexplain[i]) {
|
||||
need_to_look = TRUE;
|
||||
if (!found) {
|
||||
Sprintf(out_str, "%c %s", sym, an(monexplain[i]));
|
||||
|
||||
Reference in New Issue
Block a user