]> granicus.if.org Git - nethack/commitdiff
more munstone fixes
authornethack.rankin <nethack.rankin>
Tue, 18 Apr 2006 03:41:05 +0000 (03:41 +0000)
committernethack.rankin <nethack.rankin>
Tue, 18 Apr 2006 03:41:05 +0000 (03:41 +0000)
      Move part of the recent "munstone fixes" patch to the branch code
since one of those fixes prevents accessing freed memory.  The part that
lets monsters eat tins of lizard meat or tins of acidic monsters in order
to get the same benefit as the corresponding corpse has been left out.

doc/fixes34.4
doc/fixes35.0
src/muse.c

index 7aaa8b988173d23d704b28562c7852320f7e2488..37ed9545612ea3814acfe7219ffefd9e1e87acb9 100644 (file)
@@ -207,6 +207,10 @@ shattering a monster's weapon didn't work as intended for stack of N>1
 don't reveal surface information that you can neither feel or see
 if the hero or a monster is already in a pit don't have them "fall into a chasm" 
        from drum of earthquake
+monsters who ate lizard corpses to cure confusion would lose intrinsic speed
+monsters couldn't eat lizard corpses to cure being stunned
+code handling a monster's use of potion or food to cure stoning or confusion
+       was accessing freed memory after the object had been used up
 
 
 Platform- and/or Interface-Specific Fixes
index 287cbaef36b4e27d74635bb4a0cd9376db906bf8..fe2f69f0f75d99612c9205a2cd739cb350a55529 100644 (file)
@@ -136,10 +136,6 @@ preform autopickup and/or report on objects at the spot when a failed #untrap
        attempt causes the hero to move onto a trap's location
 thrown silver weapon hitting silver-hating poly'd hero got double silver damage
 wielded silver weapon hitting silver-hating poly'd hero lacked silver message
-monsters who ate lizard corpses to cure confusion would lose intrinsic speed
-monsters couldn't eat lizard corpses to cure being stunned
-code handling a monster's use of potion or food to cure stoning or confusion
-       was accessing freed memory after the object had been used up
 
 
 Platform- and/or Interface-Specific Fixes
index 157341465873792dbba70b86306a1b3d972997fc..a69171541941725c3d547a028ecae8fd3a67a62c 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)muse.c     3.5     2006/04/11      */
+/*     SCCS Id: @(#)muse.c     3.5     2006/04/17      */
 /*     Copyright (C) 1990 by Ken Arromdee                         */
 /* NetHack may be freely redistributed.  See license for details.  */
 
@@ -2168,9 +2168,10 @@ boolean stoning;
              distant_name(obj, doname));
        obj->quan = save_quan;
     } else if (!Deaf)
-       You_hear("%s.", (obj->otyp == POT_ACID) ? "drinking" : "chewing");
+       You_hear("%s.", (obj->oclass == POTION_CLASS) ? "drinking" : "chewing");
 
     m_useup(mon, obj);
+    /* obj is now gone */
 
     if (acid && !tinned && !resists_acid(mon)) {
        mon->mhp -= rnd(15);