From f82da6e4c8d41e2e0da8e776134ea6bc23cbd20e Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Mon, 20 Sep 2021 15:11:24 +0200 Subject: [PATCH] Bug fix in TBF.Data.SetData( ) - divide by zero, ver. 3.1.1740 --- TBF/Data.cs | 2 +- TBF/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TBF/Data.cs b/TBF/Data.cs index ab3ecdc91..86c957b78 100644 --- a/TBF/Data.cs +++ b/TBF/Data.cs @@ -29,7 +29,7 @@ namespace TBF CompoundWMsCount = compoundWMsCount; LineSize = wmsCount / Math.Max(1, linesCount); HeatMetersCount = 0; - MaxPartNr = WMsCount / LineSize; + MaxPartNr = (LineSize != 0) ? (WMsCount / LineSize) : 1; } /// diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 503f85ebe..89dcabbda 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("3.1.1736.0")] -[assembly: AssemblyFileVersion("3.1.1736.0")] +[assembly: AssemblyVersion("3.1.1740.0")] +[assembly: AssemblyFileVersion("3.1.1740.0")]