From c9fc3e788a713808a3a64fe67461344baafb9b67 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Tue, 25 Jul 2023 20:25:07 +0200 Subject: [PATCH] Div by zero fix --- app/HardwareControl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/HardwareControl.cs b/app/HardwareControl.cs index 92a64ee4..69f0147f 100644 --- a/app/HardwareControl.cs +++ b/app/HardwareControl.cs @@ -161,7 +161,7 @@ public static class HardwareControl } ReadFullChargeCapacity(); - if (designCapacity is null || fullCapacity is null) + if (designCapacity is null || fullCapacity is null || designCapacity == 0 || fullCapacity == 0) { return -1; }