Skip to content

Commit

Permalink
Return instead of else
Browse files Browse the repository at this point in the history
  • Loading branch information
arbiter0xf committed Dec 28, 2021
1 parent 55a48bd commit fc9ef0a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ void actor_hitpoints_increase(struct actor* const a, int inc_amount)

if (new_hitpoints > a->combat.hitpoints_max) {
a->combat.hitpoints = a->combat.hitpoints_max;
} else {
a->combat.hitpoints = new_hitpoints;
return;
}

a->combat.hitpoints = new_hitpoints;
}

void actor_set_row(struct actor* const a, int new_row)
Expand Down

0 comments on commit fc9ef0a

Please sign in to comment.