diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-07-03 17:25:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 17:25:05 -0400 |
commit | 585d92f298e1edd8f756f8362de45c9fadc6fcab (patch) | |
tree | 2e3b17d37c4782f575329fc0fbe1f7bd406e6bad /src/battle_script_commands.c | |
parent | 558097f42326f19044a6351004468a46d6ee0b38 (diff) | |
parent | ff94d49a45ef605cfaed1268aa5a230958e25cd9 (diff) |
Merge pull request #445 from Kurausukun/ubfix
Port UBFIX Macro and Some Usages from Emerald
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r-- | src/battle_script_commands.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ee9251017..c6ab568ff 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3108,7 +3108,7 @@ static void atk23_getexp(void) calculatedExp = gBaseStats[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7; if (viaExpShare) // at least one mon is getting exp via exp share { - *exp = calculatedExp / 2 / viaSentIn; + *exp = SAFE_DIV(calculatedExp / 2, viaSentIn); if (*exp == 0) *exp = 1; gExpShareExp = calculatedExp / 2 / viaExpShare; @@ -3117,7 +3117,7 @@ static void atk23_getexp(void) } else { - *exp = calculatedExp / viaSentIn; + *exp = SAFE_DIV(calculatedExp, viaSentIn); if (*exp == 0) *exp = 1; gExpShareExp = 0; |