summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src/main_window.cpp
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-11-30 04:29:19 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-11-30 04:29:19 +0000
commita8a11e811c3c0cc3f6d74c18c89841e9e0e87237 (patch)
tree775e65659d26870bba82b84fb584a5301606ff62 /plugins/DbEditorPP/src/main_window.cpp
parent79041310665c9b0b93c368bb1f7cef5f669a419e (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/DbEditorPP/src/main_window.cpp')
-rw-r--r--plugins/DbEditorPP/src/main_window.cpp8
1 files changed, 4 insertions, 4 deletions
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;