cppcheck: bug in defense weapon selection

This commit is contained in:
Enno Rehling 2018-12-04 21:12:39 +01:00
parent f46f91e162
commit 95498171d7

View file

@ -1318,7 +1318,7 @@ terminate(troop dt, troop at, int type, const char *damage_formula, bool missile
++at.fighter->hits;
calculate_attack_type(at, dt, type, missile, &awtype, &attskill, &magic);
calculate_defense_type(at, dt, type, missile, &awtype, &attskill);
calculate_defense_type(at, dt, type, missile, &dwtype, &defskill);
if (is_riding(at) && (awtype == NULL || (fval(awtype, WTF_HORSEBONUS)
&& !fval(awtype, WTF_MISSILE)))) {