From: cohrs Date: Sun, 6 Apr 2003 15:02:57 +0000 (+0000) Subject: is_damageable was always true X-Git-Tag: MOVE2GIT~2035 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b39599719eb5e5f1a2e9b35f2162d30d17988bc8;p=nethack is_damageable was always true noticed that is_damageable used the address of is_rottable instead of calling it. Unfortunately, there doesn't seem to be a good compiler warning to detect uses of function addresses as booleans. --- diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 6682421d8..22a441fba 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -35,6 +35,7 @@ dropping from height or throwing a normal container may damage contents some Magicbane messages treated "erinys" as plural initialize artifacts before processing $WIZKIT clean up inconsistency between various places quaff is documented +is_damageable was using is_rottable incorrectly Platform- and/or Interface-Specific Fixes diff --git a/include/objclass.h b/include/objclass.h index 474845034..0af21a4e5 100644 --- a/include/objclass.h +++ b/include/objclass.h @@ -75,7 +75,7 @@ struct objclass { #define is_corrodeable(otmp) (objects[otmp->otyp].oc_material == COPPER || objects[otmp->otyp].oc_material == IRON) #define is_damageable(otmp) (is_rustprone(otmp) || is_flammable(otmp) || \ - is_rottable || is_corrodeable(otmp)) + is_rottable(otmp) || is_corrodeable(otmp)) schar oc_subtyp; #define oc_skill oc_subtyp /* Skills of weapons, spellbooks, tools, gems */