From fd1e1bdc1173d8b9afe2a8479ace973325172f6e Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Sun, 18 Aug 2013 20:34:51 +0000 Subject: ProcessorNameString fix (patch from person) git-svn-id: http://svn.miranda-ng.org/main/trunk@5735 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/VersionInfo/src/CVersionInfo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/VersionInfo') 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")); -- cgit v1.2.3