diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-01-10 12:34:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-10 12:34:39 -0500 |
commit | e6aebc16da96d5aa6397bc269bd1646bf6ffbbb6 (patch) | |
tree | c066cb266bf7a61244326110d70f51af5b08a9c3 | |
parent | 42a0b20e57f7947f5ccfd61b12fdb71ef1891950 (diff) | |
parent | 8afc28c98ffe55e9abf747ec274eaaa826c177a8 (diff) |
Merge pull request #1296 from GriffinRichards/bugfix-typo
Add missing braces to bugfix in CalculateMonStats
-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 5bccef907..b9264c4c2 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; } |