From a8a11e811c3c0cc3f6d74c18c89841e9e0e87237 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Sun, 30 Nov 2014 04:29:19 +0000 Subject: Multiple fixes buff size for GetText and SetText. git-svn-id: http://svn.miranda-ng.org/main/trunk@11165 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Msg_Export/src/FileViewer.cpp | 2 +- plugins/Msg_Export/src/options.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/Msg_Export/src') diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp index 34f8f3b677..7c32b3fb5b 100755 --- a/plugins/Msg_Export/src/FileViewer.cpp +++ b/plugins/Msg_Export/src/FileViewer.cpp @@ -1023,7 +1023,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, TCHAR szFormat[200]; TCHAR szTitle[200]; - if (GetWindowText(hwndDlg, szFormat, sizeof( szFormat))) { + if (GetWindowText(hwndDlg, szFormat, SIZEOF(szFormat))) { const TCHAR *pszNick = NickFromHandle( pclDlg->hContact); tstring sPath = pclDlg->sPath; string::size_type n = sPath.find_last_of( '\\'); diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp index 499e0c7f16..6d7ef44862 100755 --- a/plugins/Msg_Export/src/options.cpp +++ b/plugins/Msg_Export/src/options.cpp @@ -394,7 +394,7 @@ BOOL bApplyChanges( HWND hwndDlg ) sItem.iItem = nCur; sItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE; sItem.pszText = szTemp; - sItem.cchTextMax = sizeof( szTemp); + sItem.cchTextMax = SIZEOF(szTemp); if (ListView_GetItem( hMapUser, &sItem)) { @@ -483,7 +483,7 @@ void AutoFindeFileNames(HWND hwndDlg) sItem.iItem = nCur; sItem.iSubItem = 1; sItem.pszText = szSearch; - sItem.cchTextMax = sizeof( szSearch); + sItem.cchTextMax = SIZEOF(szSearch); if ( !ListView_GetItem( hMapUser, &sItem)) { @@ -502,7 +502,7 @@ void AutoFindeFileNames(HWND hwndDlg) sItem.iItem = nSubCur; sItem.iSubItem = 1; sItem.pszText = szSubCur; - sItem.cchTextMax = sizeof( szSubCur); + sItem.cchTextMax = SIZEOF(szSubCur); if (ListView_GetItem( hMapUser, &sItem)) { size_t nLen = _tcslen( szSubCur); @@ -521,13 +521,13 @@ void AutoFindeFileNames(HWND hwndDlg) { tstring sFileName; szSearch[0] = 0; - ListView_GetItemText( hMapUser, nCur, 0, szSearch, sizeof( szSearch )); + ListView_GetItemText( hMapUser, nCur, 0, szSearch, SIZEOF( szSearch )); bool bPriHasFileName = szSearch[0] != 0; if (bPriHasFileName ) sFileName = szSearch; szSearch[0] = 0; - ListView_GetItemText( hMapUser, nStortestIndex, 0, szSearch, sizeof( szSearch )); + ListView_GetItemText( hMapUser, nStortestIndex, 0, szSearch, SIZEOF( szSearch )); bool bSubHasFileName = szSearch[0] != 0; if (bSubHasFileName ) sFileName = szSearch; @@ -1188,7 +1188,7 @@ BOOL bApplyChanges2( HWND hwndDlg ) sItem.iItem = nCur; sItem.mask = LVIF_TEXT | LVIF_IMAGE; sItem.pszText = &szTemp[12]; - sItem.cchTextMax = sizeof( szTemp )-15; + sItem.cchTextMax = (SIZEOF(szTemp) - 15); if (::SendMessage(hMapUser, LVM_GETITEMA, 0, (LPARAM)&sItem)) { if (sItem.iImage ) -- cgit v1.2.3