]> granicus.if.org Git - nethack/commitdiff
is_damageable was always true
authorcohrs <cohrs>
Sun, 6 Apr 2003 15:02:57 +0000 (15:02 +0000)
committercohrs <cohrs>
Sun, 6 Apr 2003 15:02:57 +0000 (15:02 +0000)
<Someone> 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.

doc/fixes34.2
include/objclass.h

index 6682421d8ac66a782b1708ec400d9ee72c0f3077..22a441fbabd8aeed3a71a728756961b090fe171f 100644 (file)
@@ -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
index 474845034be5c3238ce4e062439f1f49de98454e..0af21a4e5b0b5c8a9cf967aa10421944013b0349 100644 (file)
@@ -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 */