Hardware/CPU/CPUGroup.cs
changeset 18 49220085218d
parent 14 51c2f209da6d
child 35 2daf59392c88
     1.1 --- a/Hardware/CPU/CPUGroup.cs	Mon Feb 01 20:17:02 2010 +0000
     1.2 +++ b/Hardware/CPU/CPUGroup.cs	Mon Feb 01 21:04:14 2010 +0000
     1.3 @@ -111,7 +111,7 @@
     1.4              AppendRegister(nameBuilder, edx);
     1.5            }
     1.6          }
     1.7 -        cpuBrandString = nameBuilder.ToString();
     1.8 +        cpuBrandString = nameBuilder.ToString().Trim('\0');
     1.9          nameBuilder.Replace("(R)", " ");
    1.10          nameBuilder.Replace("(TM)", " ");
    1.11          nameBuilder.Replace("(tm)", " ");
    1.12 @@ -177,8 +177,6 @@
    1.13      }
    1.14  
    1.15      public string GetReport() {
    1.16 -      if (hardware.Count == 0)
    1.17 -        return null;
    1.18  
    1.19        StringBuilder r = new StringBuilder();
    1.20  
    1.21 @@ -199,10 +197,12 @@
    1.22        r.AppendLine("CPUID Return Values");
    1.23        r.AppendLine();
    1.24  
    1.25 -      r.AppendLine(" Function  EAX       EBX       ECX       EDX");
    1.26 -      AppendCpuidData(r, cpuidData, CPUID);
    1.27 -      AppendCpuidData(r, cpuidExtData, CPUID_EXT);
    1.28 -      r.AppendLine();
    1.29 +      if (cpuidData != null) {
    1.30 +        r.AppendLine(" Function  EAX       EBX       ECX       EDX");
    1.31 +        AppendCpuidData(r, cpuidData, CPUID);
    1.32 +        AppendCpuidData(r, cpuidExtData, CPUID_EXT);
    1.33 +        r.AppendLine();
    1.34 +      }
    1.35  
    1.36        return r.ToString();
    1.37      }