From 5a06d89c3d961ed1f16b00fbe682ebb811b8e02e Mon Sep 17 00:00:00 2001 From: Joe Biellik Date: Wed, 3 Jan 2018 18:27:43 +0000 Subject: [PATCH] Fix potential division by zero --- TVRename#/TheTVDB/TheTVDB.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TVRename#/TheTVDB/TheTVDB.cs b/TVRename#/TheTVDB/TheTVDB.cs index 62aa8ffac..21bcfbdc7 100644 --- a/TVRename#/TheTVDB/TheTVDB.cs +++ b/TVRename#/TheTVDB/TheTVDB.cs @@ -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;