summaryrefslogtreecommitdiff
path: root/plugins/VersionInfo
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2013-08-18 20:34:51 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2013-08-18 20:34:51 +0000
commitfd1e1bdc1173d8b9afe2a8479ace973325172f6e (patch)
treeaa9bef4f126581161748927a08975471dfb8f4c7 /plugins/VersionInfo
parentfca84c3758947e6d933897fac7c9791d45fbb476 (diff)
ProcessorNameString fix (patch from person)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5735 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/VersionInfo')
-rw-r--r--plugins/VersionInfo/src/CVersionInfo.cpp5
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"));