Skip to content

Commit

Permalink
more munstone fixes
Browse files Browse the repository at this point in the history
      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.
  • Loading branch information
nethack.rankin committed Apr 18, 2006
1 parent 857a46c commit fc9c337
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 4 additions & 0 deletions doc/fixes34.4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions doc/fixes35.0
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/muse.c
Original file line number Diff line number Diff line change
@@ -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. */

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit fc9c337

Please sign in to comment.