Skip to content

Commit

Permalink
Fixed divide by zero error on ticking planets
Browse files Browse the repository at this point in the history
  • Loading branch information
icydee committed Jul 7, 2012
1 parent 86df8e3 commit 4fa04b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Lacuna/DB/Result/Map/Body/Planet.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ sub recalc_stats {
}
}
my $reduce_factor = 1;
if ($positive_ore_hour >= $ore_consumption_hour) {
if ($positive_ore_hour and $positive_ore_hour >= $ore_consumption_hour) {
$reduce_factor = $ore_consumption_hour / $positive_ore_hour;
}
foreach my $type (ORE_TYPES) {
Expand Down

0 comments on commit 4fa04b6

Please sign in to comment.