diff --git a/Thermo.Active.Utils/supportFunctions.cs b/Thermo.Active.Utils/supportFunctions.cs index 80fd2587..5defccca 100644 --- a/Thermo.Active.Utils/supportFunctions.cs +++ b/Thermo.Active.Utils/supportFunctions.cs @@ -560,12 +560,19 @@ namespace Thermo.Active.Utils { machineNumber = "0000"; } - if (containsLetters) - // Convert ASCII string to a single INT - intMachineVal = SupportFunctions.ConvertAsciiStringToInt(machineNumber); - else - // Convert string of digits to a INT - intMachineVal = int.Parse(machineNumber); + try + { + if (containsLetters) + // Convert ASCII string to a single INT + intMachineVal = SupportFunctions.ConvertAsciiStringToInt(machineNumber); + else + // Convert string of digits to a INT + intMachineVal = int.Parse(machineNumber); + } + catch + { + intMachineVal = 0; + } } //----- Chipher Private Class ---------------------------------