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/moduletree.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/DbEditorPP/src/moduletree.cpp') diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp index 55e69821ce..7903ea7848 100644 --- a/plugins/DbEditorPP/src/moduletree.cpp +++ b/plugins/DbEditorPP/src/moduletree.cpp @@ -193,7 +193,7 @@ int findItemInTree(HWND hwnd2Tree, MCONTACT hContact, char *module) item.mask = TVIF_STATE | TVIF_PARAM | TVIF_TEXT; item.hItem = TVI_ROOT; item.pszText = text; - item.cchTextMax = 264; + item.cchTextMax = SIZEOF(text); do { do { lastItem = item.hItem; @@ -268,7 +268,7 @@ BOOL findAndRemoveDuplicates(HWND hwnd2Tree, MCONTACT hContact, char *module) item.mask = TVIF_STATE | TVIF_PARAM | TVIF_TEXT; item.hItem = TVI_ROOT; item.pszText = text; - item.cchTextMax = 264; + item.cchTextMax = SIZEOF(text); prelastItem = item.hItem; do { @@ -383,7 +383,7 @@ void __cdecl PopulateModuleTreeThreadFunc(LPVOID di) TVITEM tvi = {0}; tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_TEXT; tvi.pszText = SelectedModule; - tvi.cchTextMax = 255; + tvi.cchTextMax = SIZEOF(SelectedModule); tvi.hItem = item; TreeView_GetItem(hwnd2Tree, &tvi); @@ -595,7 +595,7 @@ void moduleListWM_NOTIFY(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)// hw tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_TEXT; tvi.hItem = pnmtv->itemNew.hItem; tvi.pszText = text; - tvi.cchTextMax = 264; + tvi.cchTextMax = SIZEOF(text); TreeView_GetItem(pnmtv->hdr.hwndFrom, &tvi); if (tvi.lParam) { @@ -706,7 +706,7 @@ void moduleListWM_NOTIFY(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)// hw tvi.mask = TVIF_HANDLE | TVIF_TEXT | TVIF_PARAM; tvi.hItem = ptvdi->item.hItem; tvi.pszText = text; - tvi.cchTextMax = 264; + tvi.cchTextMax = SIZEOF(text); TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &tvi); mtis = (ModuleTreeInfoStruct *)ptvdi->item.lParam; @@ -756,7 +756,7 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam, LPARAM lParam) // hwnd here tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_TEXT; tvi.hItem = hti.hItem; tvi.pszText = module; - tvi.cchTextMax = 255; + tvi.cchTextMax = SIZEOF(module); TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &tvi); if (tvi.lParam) { ModuleTreeInfoStruct *mtis = (ModuleTreeInfoStruct *)tvi.lParam; -- cgit v1.2.3