reinstate obj guard on _see_with_infrared macro
Checking the callers:
newsym() the use of see_with_infrared() is guarded by
} else if ((mon = m_at(x, y)) != 0 [...]
do_mgivenname() the use of see_with_infrared is guarded by !mtmp:
&& (!mtmp
|| (!sensemon(mtmp)
&& (!(cansee(cx, cy) || see_with_infrared(mtmp))
howmonseen(mon) dereferences mon in other places, so it would
segfault if mon were NULL; howmonseen has NONNULLARG1.
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
* canseemon() or canspotmon() which already check that.
|
||||
*/
|
||||
#define _see_with_infrared(mon) \
|
||||
(!Blind && Infravision && mon && infravisible(mon->data) \
|
||||
(!Blind && Infravision && infravisible(mon->data) \
|
||||
&& couldsee(mon->mx, mon->my))
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user