summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/fight.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 9792d59602..2b1e89e019 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -2680,10 +2680,7 @@ void melee_attack::player_calc_hit_damage()
// This doesn't actually modify damage. -- bwr
// It only chooses the appropriate verb.
- damage_done = player_weapon_type_modify( damage_done );
-
- if (damage_done < 0)
- damage_done = 0;
+ damage_done = std::max(0, player_weapon_type_modify(damage_done));
}
int melee_attack::calc_to_hit(bool random)