# HG changeset patch # User moel.mich # Date 1329953786 0 # Node ID 46b6b567f14f67aa194e1baf1e9d1320d28da326 # Parent 2486df89b9e5663065ac9c5ffb793ac66e81393f Fixed a division by zero in the Sandforce write amplification sensor. diff -r 2486df89b9e5 -r 46b6b567f14f Hardware/HDD/SSDSandforce.cs --- a/Hardware/HDD/SSDSandforce.cs Wed Feb 22 23:32:06 2012 +0000 +++ b/Hardware/HDD/SSDSandforce.cs Wed Feb 22 23:36:26 2012 +0000 @@ -92,8 +92,11 @@ hostWritesToController = RawToInt(value.RawValue, value.AttrValue); } if (controllerWritesToNAND.HasValue && hostWritesToController.HasValue) { - writeAmplification.Value = - controllerWritesToNAND.Value / hostWritesToController.Value; + if (hostWritesToController.Value > 0) + writeAmplification.Value = + controllerWritesToNAND.Value / hostWritesToController.Value; + else + writeAmplification.Value = 0; ActivateSensor(writeAmplification); } } diff -r 2486df89b9e5 -r 46b6b567f14f Properties/AssemblyVersion.cs --- a/Properties/AssemblyVersion.cs Wed Feb 22 23:32:06 2012 +0000 +++ b/Properties/AssemblyVersion.cs Wed Feb 22 23:36:26 2012 +0000 @@ -37,5 +37,5 @@ using System.Reflection; -[assembly: AssemblyVersion("0.4.0.3")] -[assembly: AssemblyInformationalVersion("0.4.0.3 Alpha")] \ No newline at end of file +[assembly: AssemblyVersion("0.4.0.4")] +[assembly: AssemblyInformationalVersion("0.4.0.4 Alpha")] \ No newline at end of file