diff options
Diffstat (limited to 'plugins/VersionInfo/src/CVersionInfo.cpp')
-rw-r--r-- | plugins/VersionInfo/src/CVersionInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/VersionInfo/src/CVersionInfo.cpp b/plugins/VersionInfo/src/CVersionInfo.cpp index 4d668a1591..6fd4f53678 100644 --- a/plugins/VersionInfo/src/CVersionInfo.cpp +++ b/plugins/VersionInfo/src/CVersionInfo.cpp @@ -266,10 +266,11 @@ bool CVersionInfo::GetHWSettings() {
TCHAR cpuIdent[512] = {0}, cpuName[512] = {0};
DWORD size;
- if (RegQueryValueEx(hKey, _T("ProcessorNameString"), NULL, NULL, (LPBYTE)cpuName, &size) != ERROR_SUCCESS)
+ size = SIZEOF(cpuName);
+ if (RegQueryValueEx(hKey, TEXT("ProcessorNameString"), NULL, NULL, (LPBYTE) cpuName, &size) != ERROR_SUCCESS)
_tcscpy(cpuName, _T("Unknown"));
lpzCPUName = cpuName;
-
+ size = SIZEOF(cpuIdent);
if (RegQueryValueEx(hKey, TEXT("Identifier"), NULL, NULL, (LPBYTE) cpuIdent, &size) != ERROR_SUCCESS)
if (RegQueryValueEx(hKey, TEXT("VendorIdentifier"), NULL, NULL, (LPBYTE) cpuIdent, &size) != ERROR_SUCCESS)
_tcscpy(cpuIdent, _T("Unknown"));
|