diff --git a/src/detection/cpu/cpu_windows.c b/src/detection/cpu/cpu_windows.c index 534ec74b4..6a4d8195e 100644 --- a/src/detection/cpu/cpu_windows.c +++ b/src/detection/cpu/cpu_windows.c @@ -139,7 +139,7 @@ static const char* detectByRegistry(FFCPUResult* cpu) if(!ffRegOpenKeyForRead(HKEY_LOCAL_MACHINE, L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", &hKey, NULL)) return "ffRegOpenKeyForRead(HKEY_LOCAL_MACHINE, L\"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\", &hKey, NULL) failed"; - if (detectSpeedByCpuid(cpu) == NULL && cpu->frequencyBase == 0) + if (detectSpeedByCpuid(cpu) != NULL || cpu->frequencyBase != cpu->frequencyBase) { uint32_t mhz; if(ffRegReadUint(hKey, L"~MHz", &mhz, NULL)) @@ -167,7 +167,7 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) if (error) return error; - if (cpu->frequencyMax == 0) + if (cpu->frequencyMax != cpu->frequencyMax) detectMaxSpeedBySmbios(cpu); if(options->temp)