Skip to content

Commit

Permalink
Bugfix: calculate kill exp correctly
Browse files Browse the repository at this point in the history
Now using correct int type for calculation
  • Loading branch information
Michael R. Cook committed Jan 20, 2018
1 parent 45d86c6 commit c2d680c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ bool playerSavingThrow() {
}

void playerGainKillExperience(Creature_t const &creature) {
uint16_t exp = creature.kill_exp_value * creature.level;
int32_t exp = creature.kill_exp_value * creature.level;

int32_t quotient = exp / py.misc.level;
int32_t remainder = exp % py.misc.level;
Expand Down

0 comments on commit c2d680c

Please sign in to comment.