From 8d438be45b7cf027a1c1af2f4ec11d24822d576c Mon Sep 17 00:00:00 2001 From: Juha Sointusalo Date: Fri, 23 Mar 2018 18:19:18 +0200 Subject: [PATCH] Merge pull request #2406 from versat/patch-1 Fix buffer size for call of function GetWindowText --- clientsetup/win/CAShutdownBOINCManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientsetup/win/CAShutdownBOINCManager.cpp b/clientsetup/win/CAShutdownBOINCManager.cpp index 6ea1fd44b64..66e9df45c5e 100644 --- a/clientsetup/win/CAShutdownBOINCManager.cpp +++ b/clientsetup/win/CAShutdownBOINCManager.cpp @@ -83,7 +83,7 @@ UINT CAShutdownBOINCManager::OnExecution() hWndBOINCManagerSystray = FindWindow( _T("wxTaskBarExWindowClass"), _T("BOINCManagerSystray") ); if ( NULL != hWndBOINCManagerSystray ) { - GetWindowText( hWndBOINCManagerSystray, szWindowTitle, (sizeof(szWindowTitle) * sizeof(TCHAR))); + GetWindowText( hWndBOINCManagerSystray, szWindowTitle, (sizeof(szWindowTitle) / sizeof(TCHAR))); LogProgress( szWindowTitle ); lrReturnValue = SendMessage( hWndBOINCManagerSystray, WM_TASKBARSHUTDOWN, NULL, NULL );