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/UserInfoEx/src/ctrl_contact.cpp | |
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/UserInfoEx/src/ctrl_contact.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/ctrl_contact.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index 110a40f80e..9c527acf06 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -171,11 +171,11 @@ static INT_PTR CALLBACK DlgProc_EMail(HWND hDlg, UINT msg, WPARAM wParam, LPARAM {
TCHAR szButton[MAX_PATH];
HWND hBtn = GetDlgItem(hDlg, IDOK);
- GetWindowText(hBtn, szButton, MAX_PATH);
+ GetWindowText(hBtn, szButton, SIZEOF(szButton));
SetWindowText(hBtn, TranslateTS(szButton));
hBtn = GetDlgItem(hDlg, IDCANCEL);
- GetWindowText(hBtn, szButton, MAX_PATH);
+ GetWindowText(hBtn, szButton, SIZEOF(szButton));
SetWindowText(hBtn, TranslateTS(szButton));
}
return TRUE;
@@ -253,10 +253,10 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam HWND hBtn;
hBtn = GetDlgItem(hDlg, IDOK);
- GetWindowText(hBtn, szButton, MAX_PATH);
+ GetWindowText(hBtn, szButton, SIZEOF(szButton));
SetWindowText(hBtn, TranslateTS(szButton));
hBtn = GetDlgItem(hDlg, IDCANCEL);
- GetWindowText(hBtn, szButton, MAX_PATH);
+ GetWindowText(hBtn, szButton, SIZEOF(szButton));
SetWindowText(hBtn, TranslateTS(szButton));
}
if (*cbi->pszVal) SetWindowText(hDlg, LPGENT("Edit phone number"));
@@ -844,7 +844,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L int errorPos;
TCHAR szEdit[MAXDATASIZE];
- if (ccVal = GetWindowText(cbex->hEdit, szEdit, MAXDATASIZE)) {
+ if (ccVal = GetWindowText(cbex->hEdit, szEdit, SIZEOF(szEdit))) {
if (!(ccVal = CheckPhoneSyntax(szEdit, szVal, MAXDATASIZE, errorPos)) || errorPos > -1) {
SetWindowText(cbex->hEdit, szVal);
SendMessage(cbex->hEdit, EM_SETSEL, errorPos, errorPos);
@@ -853,10 +853,10 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L break;
}
case EDIT_EMAIL:
- ccVal = GetWindowText(cbex->hEdit, szVal, MAXDATASIZE);
+ ccVal = GetWindowText(cbex->hEdit, szVal, SIZEOF(szVal));
break;
default:
- ccVal = GetWindowText(cbex->hEdit, szVal, MAXDATASIZE);
+ ccVal = GetWindowText(cbex->hEdit, szVal, SIZEOF(szVal));
break;
}
|