Skip to content

Commit

Permalink
fix div by 0
Browse files Browse the repository at this point in the history
  • Loading branch information
cadon committed Nov 24, 2023
1 parent 22d64a2 commit 1e1dd7e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ARKBreedingStats/OffspringPossibilities.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using ARKBreedingStats.species;
using ARKBreedingStats.values;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -92,6 +91,12 @@ public void Calculate(Species species, int[] wildLevels1, int[] wildLevels2)

private void DrawBars(Dictionary<int, double> levelProbabilities, double maxProbability)
{
if (maxProbability == 0)
{
Clear();
return;
}

SuspendLayout();
Clear(false);

Expand Down

0 comments on commit 1e1dd7e

Please sign in to comment.