Fix #1085 (incorrect buffer size), based on patch by Echelon9
This was SVN commit r10845.
This commit is contained in:
parent
3cbeb09ae8
commit
cc405939c2
@ -80,7 +80,7 @@ Status wcpu_ReadFrequencyFromRegistry(u32& freqMhz)
|
||||
if(RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", 0, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS)
|
||||
return ERR::NOT_SUPPORTED;
|
||||
|
||||
DWORD size = sizeof(&freqMhz);
|
||||
DWORD size = sizeof(freqMhz);
|
||||
LONG ret = RegQueryValueExW(hKey, L"~MHz", 0, 0, (LPBYTE)&freqMhz, &size);
|
||||
|
||||
RegCloseKey(hKey);
|
||||
|
Loading…
Reference in New Issue
Block a user