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:
@@ -118,6 +118,7 @@ prevent "remove_object: obj not on floor" panic for iron ball placement if
|
|||||||
riding while punished leads to a fall off steed when changing levels
|
riding while punished leads to a fall off steed when changing levels
|
||||||
specifying -D (or -X) to enter explore mode while restarting from a save
|
specifying -D (or -X) to enter explore mode while restarting from a save
|
||||||
file was lost in the restore process
|
file was lost in the restore process
|
||||||
|
fix crash when using lookat on an known invisible monster with monster syms set
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+2
-1
@@ -531,7 +531,8 @@ do_look(quick)
|
|||||||
|
|
||||||
/* Check for monsters */
|
/* Check for monsters */
|
||||||
for (i = 0; i < MAXMCLASSES; i++) {
|
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;
|
need_to_look = TRUE;
|
||||||
if (!found) {
|
if (!found) {
|
||||||
Sprintf(out_str, "%c %s", sym, an(monexplain[i]));
|
Sprintf(out_str, "%c %s", sym, an(monexplain[i]));
|
||||||
|
|||||||
Reference in New Issue
Block a user