diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 6940995aa..7620743c2 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -255,6 +255,8 @@ monster who accidentally killed itself by zapping wand of fire or fire horn at self to prevent turning into slime was not properly killed off; it wouldn't benefit from an amulet of life saving and would trigger impossible "dmonsfree: N removed doesn't match M pending" +resurrecting a shopkeeper corpse caused crash (replmon -> replshk -> inhishop + -> no eshk data for temporary monster being replaced with revived shk) Fixes to Post-3.6.0 Problems that Were Exposed Via git Respository diff --git a/src/zap.c b/src/zap.c index 3ccb8059d..6bc482278 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 zap.c $NHDT-Date: 1462663451 2016/05/07 23:24:11 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.252 $ */ +/* NetHack 3.6 zap.c $NHDT-Date: 1463533826 2016/05/18 01:10:26 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.255 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -615,6 +615,16 @@ coord *cc; mtmp2->mblinded = 0; mtmp2->mstun = 0; mtmp2->mconf = 0; + /* when traits are for a shopeekper, dummy monster 'mtmp' won't + have necessary eshk data for replmon() -> replshk() */ + if (mtmp2->isshk) { + neweshk(mtmp); + *ESHK(mtmp) = *ESHK(mtmp2); + if (ESHK(mtmp2)->bill_p != 0 + && ESHK(mtmp2)->bill_p != (struct bill_x *) -1000) + ESHK(mtmp)->bill_p = &(ESHK(mtmp)->bill[0]); + mtmp->isshk = 1; + } replmon(mtmp, mtmp2); newsym(mtmp2->mx, mtmp2->my); /* Might now be invisible */