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/DbEditorPP/src/main_window.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/DbEditorPP/src/main_window.cpp') diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp index 96acfc7daf..6248aeac86 100644 --- a/plugins/DbEditorPP/src/main_window.cpp +++ b/plugins/DbEditorPP/src/main_window.cpp @@ -109,7 +109,7 @@ LRESULT CALLBACK ModuleTreeSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_TEXT; tvi.hItem = TreeView_GetSelection(hwnd); tvi.pszText = module; - tvi.cchTextMax = 255; + tvi.cchTextMax = SIZEOF(module); if (TreeView_GetItem(hwnd, &tvi) && tvi.lParam) { ModuleTreeInfoStruct *mtis = (ModuleTreeInfoStruct *)tvi.lParam; MCONTACT hContact = mtis->hContact; @@ -166,7 +166,7 @@ static LRESULT CALLBACK SettingListSubclassProc(HWND hwnd, UINT msg, WPARAM wPar break; hContact = sli->hContact; module = sli->module; - ListView_GetItemText(hwnd, ListView_GetSelectionMark(hwnd), 0, setting, 256); + ListView_GetItemText(hwnd, ListView_GetSelectionMark(hwnd), 0, setting, SIZEOF(setting)); if (wParam == VK_F2) editSetting(hContact, module, setting); @@ -373,7 +373,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) TVITEM tvi = { 0 }; tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_TEXT; tvi.pszText = module; - tvi.cchTextMax = 255; + tvi.cchTextMax = SIZEOF(module); tvi.hItem = item; if (TreeView_GetItem(hwnd2Tree, &tvi)) { MCONTACT hContact = 0; @@ -452,7 +452,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_TEXT; tvi.hItem = TreeView_GetSelection(GetDlgItem(hwnd, IDC_MODULES)); tvi.pszText = module; - tvi.cchTextMax = 255; + tvi.cchTextMax = SIZEOF(module); if (!TreeView_GetItem(GetDlgItem(hwnd, IDC_MODULES), &tvi)) break; if (tvi.lParam) { mtis = (ModuleTreeInfoStruct *)tvi.lParam; -- cgit v1.2.3