diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-11-30 04:29:19 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-11-30 04:29:19 +0000 |
commit | a8a11e811c3c0cc3f6d74c18c89841e9e0e87237 (patch) | |
tree | 775e65659d26870bba82b84fb584a5301606ff62 /plugins/Exchange | |
parent | 79041310665c9b0b93c368bb1f7cef5f669a419e (diff) |
Multiple fixes buff size for GetText and SetText.
git-svn-id: http://svn.miranda-ng.org/main/trunk@11165 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Exchange')
-rw-r--r-- | plugins/Exchange/src/dlg_handlers.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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);
|