From afcae1ce5031538870997cf0f4224185557ea49d Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Mon, 19 Aug 2013 06:27:36 +0000 Subject: - VersionInfo - fix for IE detect - CrashDumper - Correct SIZEOF (patch from person) git-svn-id: http://svn.miranda-ng.org/main/trunk@5740 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/VersionInfo/src/utils.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'plugins/VersionInfo') diff --git a/plugins/VersionInfo/src/utils.cpp b/plugins/VersionInfo/src/utils.cpp index 718dbd8881..9c2123239a 100644 --- a/plugins/VersionInfo/src/utils.cpp +++ b/plugins/VersionInfo/src/utils.cpp @@ -363,11 +363,14 @@ BOOL GetInternetExplorerVersion(TCHAR *ieVersion, size_t ieSize) if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\Internet Explorer"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) { DWORD size; - if (RegQueryValueEx(hKey, _T("Version"), NULL, NULL, (LPBYTE) ieVer, &size) != ERROR_SUCCESS) + size = SIZEOF(ieVer); + if (RegQueryValueEx(hKey, TEXT("Version"), NULL, NULL, (LPBYTE) ieVer, &size) != ERROR_SUCCESS) ieVer[0] = 0; - if (RegQueryValueEx(hKey, _T("Build"), NULL, NULL, (LPBYTE) ieBuild, &size) != ERROR_SUCCESS) + size = SIZEOF(ieBuild); + if (RegQueryValueEx(hKey, TEXT("Build"), NULL, NULL, (LPBYTE) ieBuild, &size) != ERROR_SUCCESS) ieBuild[0] = 0; - if (RegQueryValueEx(hKey, _T("IVer"), NULL, NULL, (LPBYTE) iVer, &size) != ERROR_SUCCESS) + size = SIZEOF(iVer); + if (RegQueryValueEx(hKey, TEXT("IVer"), NULL, NULL, (LPBYTE) iVer, &size) != ERROR_SUCCESS) iVer[0] = 0; RegCloseKey(hKey); -- cgit v1.2.3