diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
commit | 4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch) | |
tree | 9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /plugins/BossKeyPlus/src/Options.cpp | |
parent | f0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff) |
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BossKeyPlus/src/Options.cpp')
-rw-r--r-- | plugins/BossKeyPlus/src/Options.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/BossKeyPlus/src/Options.cpp b/plugins/BossKeyPlus/src/Options.cpp index 74e44af6b3..fc37629d20 100644 --- a/plugins/BossKeyPlus/src/Options.cpp +++ b/plugins/BossKeyPlus/src/Options.cpp @@ -80,7 +80,7 @@ INT_PTR CALLBACK MainOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam // status msg, if needed
if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_MAINOPT_STATMSG))) { // meaning we should save it
TCHAR tszMsg[1025];
- GetDlgItemText(hwndDlg, IDC_MAINOPT_STATMSG, tszMsg, SIZEOF(tszMsg));
+ GetDlgItemText(hwndDlg, IDC_MAINOPT_STATMSG, tszMsg, _countof(tszMsg));
if (tszMsg[0] != 0)
db_set_ts(NULL, MOD_NAME, "statmsg", tszMsg);
else // delete current setting
@@ -92,7 +92,7 @@ INT_PTR CALLBACK MainOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam // checkbox
if (IsDlgButtonChecked(hwndDlg, IDC_MAINOPT_REQPASS) == BST_CHECKED) {
char szPass[MAXPASSLEN + 1];
- GetDlgItemTextA(hwndDlg, IDC_MAINOPT_PASS, szPass, SIZEOF(szPass));
+ GetDlgItemTextA(hwndDlg, IDC_MAINOPT_PASS, szPass, _countof(szPass));
if (szPass[0] != 0){
db_set_s(NULL, MOD_NAME, "password", szPass);
wMask |= OPT_REQPASS;
@@ -258,7 +258,7 @@ INT_PTR CALLBACK AdvOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) BossKeyMenuItemUnInit();
TCHAR szMinutes[4] = { 0 };
- GetDlgItemText(hwndDlg, IDC_MAINOPT_TIME, szMinutes, SIZEOF(szMinutes));
+ GetDlgItemText(hwndDlg, IDC_MAINOPT_TIME, szMinutes, _countof(szMinutes));
minutes = _ttoi(szMinutes);
if (minutes < 1) minutes = 1;
db_set_b(NULL, MOD_NAME, "time", minutes);
|