fix wishing crash
After 05403182eb (I think, possibly the
change to objnam.c which followed that one) from a couple of days ago,
wishing for a monster name dereferenced a Null pointer and crashed.
This commit is contained in:
@@ -197,6 +197,9 @@ teleport feedback "you materialize at another location" was given too soon
|
|||||||
moving around underwater
|
moving around underwater
|
||||||
poison gas clouds located over known but unlit pools were visible as known
|
poison gas clouds located over known but unlit pools were visible as known
|
||||||
clouds but steam clouds in that situation were not
|
clouds but steam clouds in that situation were not
|
||||||
|
after the wish parsing change, wishing for "<something of monster>" or for
|
||||||
|
"<monster something>" worked as intended but wishing for "<monster>"
|
||||||
|
(where <monster> used the canonical spelling) triggered a crash
|
||||||
tty: redraw unexplored locations as S_unexplored rather than <space> after
|
tty: redraw unexplored locations as S_unexplored rather than <space> after
|
||||||
map has been partially overwritten by popup menu or text display
|
map has been partially overwritten by popup menu or text display
|
||||||
tty: previous change resulted in remnants of previous level being shown on
|
tty: previous change resulted in remnants of previous level being shown on
|
||||||
|
|||||||
@@ -829,6 +829,7 @@ const char **remainder_p;
|
|||||||
if (m_i_len > len && !strncmpi(mons[i].mname, str, m_i_len)) {
|
if (m_i_len > len && !strncmpi(mons[i].mname, str, m_i_len)) {
|
||||||
if (m_i_len == slen) {
|
if (m_i_len == slen) {
|
||||||
mntmp = i;
|
mntmp = i;
|
||||||
|
len = m_i_len;
|
||||||
break; /* exact match */
|
break; /* exact match */
|
||||||
} else if (slen > m_i_len
|
} else if (slen > m_i_len
|
||||||
&& (str[m_i_len] == ' '
|
&& (str[m_i_len] == ' '
|
||||||
|
|||||||
Reference in New Issue
Block a user