don't dereference NULL u.ustuck in dobuzz()
This commit is contained in:
@@ -773,6 +773,7 @@ in flush_screen, reorder the code slightly to complete the bot() and
|
||||
magic traps can toggle intrinsic invisibility
|
||||
Death attacking a monster does drain life attack
|
||||
add unique Rider revival messages
|
||||
don't dereference NULL u.ustuck in dobuzz() when hero has been swallowed
|
||||
|
||||
|
||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||
|
||||
15
src/zap.c
15
src/zap.c
@@ -4252,16 +4252,17 @@ dobuzz(int type, int nd, xchar sx, xchar sy, int dx, int dy,
|
||||
if (type < 0)
|
||||
return;
|
||||
tmp = zhitm(u.ustuck, type, nd, &otmp);
|
||||
if (!u.ustuck)
|
||||
if (!u.ustuck) {
|
||||
u.uswallow = 0;
|
||||
else
|
||||
} else {
|
||||
pline("%s rips into %s%s", The(fltxt), mon_nam(u.ustuck),
|
||||
exclam(tmp));
|
||||
/* Using disintegration from the inside only makes a hole... */
|
||||
if (tmp == MAGIC_COOKIE)
|
||||
u.ustuck->mhp = 0;
|
||||
if (DEADMONSTER(u.ustuck))
|
||||
killed(u.ustuck);
|
||||
/* Using disintegration from the inside only makes a hole... */
|
||||
if (tmp == MAGIC_COOKIE)
|
||||
u.ustuck->mhp = 0;
|
||||
if (DEADMONSTER(u.ustuck))
|
||||
killed(u.ustuck);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (type < 0)
|
||||
|
||||
Reference in New Issue
Block a user