1
0
forked from 0ad/0ad

Fix #1085 (incorrect buffer size), based on patch by Echelon9

This was SVN commit r10845.
This commit is contained in:
Ykkrosh 2012-01-01 14:42:58 +00:00
parent 3cbeb09ae8
commit cc405939c2

View File

@ -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);