diff --git a/Hardware/SMBIOS/SMBIOSGroup.cs b/Hardware/SMBIOS/SMBIOSGroup.cs index de1ea5f..56b3358 100644 --- a/Hardware/SMBIOS/SMBIOSGroup.cs +++ b/Hardware/SMBIOS/SMBIOSGroup.cs @@ -56,34 +56,34 @@ namespace OpenHardwareMonitor.Hardware.SMBIOS { return; List structureList = new List(); - + try { ManagementObjectCollection collection = new ManagementObjectSearcher( "root\\WMI", "SELECT SMBiosData FROM MSSMBios_RawSMBiosTables").Get(); - + byte[] raw = null; foreach (ManagementObject mo in collection) { raw = (byte[])mo["SMBiosData"]; break; - } - + } + if (raw != null && raw.Length > 0) { int offset = 0; byte type = raw[offset]; while (offset < raw.Length && type != 127) { - + type = raw[offset]; offset++; int length = raw[offset]; offset++; - ushort handle = (ushort)((raw[offset] << 8) | raw[offset + 1]); + ushort handle = (ushort)((raw[offset] << 8) | raw[offset + 1]); offset += 2; - + byte[] data = new byte[length]; Array.Copy(raw, offset - 4, data, 0, length); offset += length - 4; - + List stringsList = new List(); if (raw[offset] == 0) offset++; - while (raw[offset] != 0) { + while (raw[offset] != 0) { StringBuilder sb = new StringBuilder(); while (raw[offset] != 0) { sb.Append((char)raw[offset]); offset++; @@ -105,7 +105,7 @@ namespace OpenHardwareMonitor.Hardware.SMBIOS { } } } - } catch (NotImplementedException) { } + } catch (NotImplementedException) { } catch (ManagementException) { } table = structureList.ToArray(); } diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 721010f..f078452 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -69,5 +69,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.1.17.0")] -[assembly: AssemblyFileVersion("0.1.17.0")] +[assembly: AssemblyVersion("0.1.17.1")] +[assembly: AssemblyFileVersion("0.1.17.1")]