diff --git a/Hardware/CPU/IntelCPU.cs b/Hardware/CPU/IntelCPU.cs index 54bd315..a78e46a 100644 --- a/Hardware/CPU/IntelCPU.cs +++ b/Hardware/CPU/IntelCPU.cs @@ -305,27 +305,26 @@ namespace OpenHardwareMonitor.Hardware.CPU { for (int i = 0; i < coreTemperatures.Length; i++) { uint eax, edx; - if (Ring0.RdmsrTx( - IA32_THERM_STATUS_MSR, out eax, out edx, - 1UL << cpuid[i][0].Thread)) { - // if reading is valid - if ((eax & 0x80000000) != 0) { - // get the dist from tjMax from bits 22:16 - float deltaT = ((eax & 0x007F0000) >> 16); - float tjMax = coreTemperatures[i].Parameters[0].Value; - float tSlope = coreTemperatures[i].Parameters[1].Value; - coreTemperatures[i].Value = tjMax - tSlope * deltaT; - } else { - coreTemperatures[i].Value = null; - } + // if reading is valid + if (Ring0.RdmsrTx(IA32_THERM_STATUS_MSR, out eax, out edx, + 1UL << cpuid[i][0].Thread) && (eax & 0x80000000) != 0) + { + // get the dist from tjMax from bits 22:16 + float deltaT = ((eax & 0x007F0000) >> 16); + float tjMax = coreTemperatures[i].Parameters[0].Value; + float tSlope = coreTemperatures[i].Parameters[1].Value; + coreTemperatures[i].Value = tjMax - tSlope * deltaT; + } else { + coreTemperatures[i].Value = null; } } if (packageTemperature != null) { uint eax, edx; - if (Ring0.RdmsrTx( - IA32_PACKAGE_THERM_STATUS, out eax, out edx, - 1UL << cpuid[0][0].Thread)) { + // if reading is valid + if (Ring0.RdmsrTx(IA32_PACKAGE_THERM_STATUS, out eax, out edx, + 1UL << cpuid[0][0].Thread) && (eax & 0x80000000) != 0) + { // get the dist from tjMax from bits 22:16 float deltaT = ((eax & 0x007F0000) >> 16); float tjMax = packageTemperature.Parameters[0].Value; diff --git a/Properties/AssemblyVersion.cs b/Properties/AssemblyVersion.cs index 5abb399..f30da71 100644 --- a/Properties/AssemblyVersion.cs +++ b/Properties/AssemblyVersion.cs @@ -10,5 +10,5 @@ using System.Reflection; -[assembly: AssemblyVersion("0.6.0.5")] -[assembly: AssemblyInformationalVersion("0.6.0.5 Alpha")] \ No newline at end of file +[assembly: AssemblyVersion("0.6.0.6")] +[assembly: AssemblyInformationalVersion("0.6.0.6 Alpha")] \ No newline at end of file