avoid mk_artifact()-related memory leaks
Reported directly to devteam after being discovered in nerfhack.
This commit is contained in:
@@ -261,6 +261,7 @@ mk_mplayer(struct permonst *ptr, coordxy x, coordxy y, boolean special)
|
||||
otmp->oerodeproof = 1;
|
||||
else if (!rn2(2))
|
||||
otmp->greased = 1;
|
||||
/* mk_artifact() with otmp and A_NONE will never return NULL */
|
||||
if (special && rn2(2))
|
||||
otmp = mk_artifact(otmp, A_NONE, 99, FALSE);
|
||||
/* usually increase stack size if stackable weapon */
|
||||
|
||||
Reference in New Issue
Block a user