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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user