Skip to content

Commit

Permalink
Merge pull request #256 from JoeBiellik/div
Browse files Browse the repository at this point in the history
Fix potential division by zero
  • Loading branch information
SirSparkles authored Jan 4, 2018
2 parents deb30f8 + 5a06d89 commit 7828f02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion TVRename#/TheTVDB/TheTVDB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,8 @@ public bool GetUpdates()
}
}

float percentDirty = 100 * totaldirty / totaleps;
float percentDirty = 100;
if (totaldirty > 0 || totaleps > 0) percentDirty = 100 * totaldirty / totaleps;
if ((totaleps>0) && ((percentDirty) >=10)) // 10%
{
kvp.Value.Dirty = true;
Expand Down

0 comments on commit 7828f02

Please sign in to comment.