Skip to content
Snippets Groups Projects
Commit 62e83d8f authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Bugfix: Sporulation table couldn't handle average temperatures below zero

parent 6354fbfc
No related branches found
No related tags found
1 merge request!1Bugfix: Sporulation table couldn't handle average temperatures below zero
......@@ -53,7 +53,7 @@ public class SporulationTable {
{
try
{
return this.sporulationTable.get(hourOfDay)[new Double(Math.floor(averageTemperature)).intValue()];
return this.sporulationTable.get(hourOfDay)[Math.max(0,Double.valueOf(Math.floor(averageTemperature)).intValue())];
}
catch(NullPointerException ex)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment