is_damageable was always true
<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.
This commit is contained in:
@@ -35,6 +35,7 @@ dropping from height or throwing a normal container may damage contents
|
|||||||
some Magicbane messages treated "erinys" as plural
|
some Magicbane messages treated "erinys" as plural
|
||||||
initialize artifacts before processing $WIZKIT
|
initialize artifacts before processing $WIZKIT
|
||||||
clean up inconsistency between various places quaff is documented
|
clean up inconsistency between various places quaff is documented
|
||||||
|
is_damageable was using is_rottable incorrectly
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+1
-1
@@ -75,7 +75,7 @@ struct objclass {
|
|||||||
#define is_corrodeable(otmp) (objects[otmp->otyp].oc_material == COPPER || objects[otmp->otyp].oc_material == IRON)
|
#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) || \
|
#define is_damageable(otmp) (is_rustprone(otmp) || is_flammable(otmp) || \
|
||||||
is_rottable || is_corrodeable(otmp))
|
is_rottable(otmp) || is_corrodeable(otmp))
|
||||||
|
|
||||||
schar oc_subtyp;
|
schar oc_subtyp;
|
||||||
#define oc_skill oc_subtyp /* Skills of weapons, spellbooks, tools, gems */
|
#define oc_skill oc_subtyp /* Skills of weapons, spellbooks, tools, gems */
|
||||||
|
|||||||
Reference in New Issue
Block a user