diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-01-10 12:24:59 -0500 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2021-01-10 12:24:59 -0500 |
commit | 8afc28c98ffe55e9abf747ec274eaaa826c177a8 (patch) | |
tree | b5370480e6ced37866e516997e5b6fded8f0a78a /src | |
parent | c506cf747fa2e0a0eaff428cfd28ada7ffa58b67 (diff) |
Add missing braces to bugfix in CalculateMonStats
Diffstat (limited to 'src')
-rw-r--r-- | src/pokemon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pokemon.c b/src/pokemon.c index b5eee16b2..e8c6a6f49 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -2859,13 +2859,14 @@ void CalculateMonStats(struct Pokemon *mon) { if (currentHP == 0 && oldMaxHP == 0) currentHP = newMaxHP; - else if (currentHP != 0) + else if (currentHP != 0) { // BUG: currentHP is unintentionally able to become <= 0 after the instruction below. This causes the pomeg berry glitch. currentHP += newMaxHP - oldMaxHP; #ifdef BUGFIX if (currentHP <= 0) currentHP = 1; #endif + } else return; } |