Skip to content

Commit

Permalink
Avoid assert failure for negative bash damage (thanks agoodman)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickMcConnell committed Apr 27, 2024
1 parent a377e58 commit 02b5e5f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/player-attack.c
Expand Up @@ -938,6 +938,7 @@ static bool attempt_shield_bash(struct player *p, struct monster *mon, bool *fea
bash_dam += adj_str_td[p->state.stat_ind[STAT_STR]];

/* Paranoia. */
if (bash_dam <= 0) return false;
bash_dam = MIN(bash_dam, 125);

if (OPT(p, show_damage)) {
Expand Down

0 comments on commit 02b5e5f

Please sign in to comment.