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/Exchange/src/dlg_handlers.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins/Exchange') diff --git a/plugins/Exchange/src/dlg_handlers.cpp b/plugins/Exchange/src/dlg_handlers.cpp index ed10225453..e690c9d156 100644 --- a/plugins/Exchange/src/dlg_handlers.cpp +++ b/plugins/Exchange/src/dlg_handlers.cpp @@ -172,7 +172,7 @@ int CALLBACK ListSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) for (int i = 0; i < count; i++) { if (ListView_GetItemState(hWnd, i, LVIS_SELECTED)) { TCHAR emailID[4096]; //uhh - ListView_GetItemText(hWnd, i, 2, emailID, sizeof(emailID)); + ListView_GetItemText(hWnd, i, 2, emailID, SIZEOF(emailID)); exchangeServer.OpenMessage(emailID); } } @@ -197,16 +197,13 @@ INT_PTR CALLBACK DlgProcEmails(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam col.mask = LVCF_TEXT | LVCF_WIDTH; col.cx = 100; col.pszText = TranslateT("Entry ID"); - col.cchTextMax = (int)_tcslen(col.pszText) + 1; ListView_InsertColumn(hList, 0, &col); col.pszText = TranslateT("Subject"); col.cx = 300; - col.cchTextMax = (int)_tcslen(col.pszText) + 1; ListView_InsertColumn(hList, 0, &col); col.cx = 200; col.iSubItem = 1; col.pszText = TranslateT("Sender"); - col.cchTextMax = (int)_tcslen(col.pszText) + 1; ListView_InsertColumn(hList, 0, &col); } return TRUE; @@ -304,7 +301,7 @@ INT_PTR CALLBACK DlgProcEmails(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam item.iItem = i; item.mask = LVIF_TEXT; item.iSubItem = 2; - item.cchTextMax = sizeof(emailID); + item.cchTextMax = SIZEOF(emailID); item.pszText = emailID; ListView_GetItem(hList, &item); exchangeServer.MarkEmailAsRead(emailID); -- cgit v1.2.3