Skip to content

Commit

Permalink
fix div by 0 for ev 0 spreads
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurausukun committed Apr 8, 2021
1 parent 2a23068 commit d2fb68e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2566,7 +2566,7 @@ void CreateMonWithEVSpreadNatureOTID(struct Pokemon *mon, u16 species, u8 level,
evsBits >>= 1;
}

evAmount = MAX_TOTAL_EVS / statCount;
evAmount = SAFE_DIV(MAX_TOTAL_EVS, statCount);
evsBits = 1;
for (i = 0; i < NUM_STATS; i++)
{
Expand Down

0 comments on commit d2fb68e

Please sign in to comment.