summaryrefslogtreecommitdiff
path: root/plugins/BossKeyPlus
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/BossKeyPlus')
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp2
-rw-r--r--plugins/BossKeyPlus/src/Options.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index fa3cdf2e41..11863ee70b 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -119,7 +119,7 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam)
UINT uid = LOWORD(wParam);
if (uid == IDOK){
char password[MAXPASSLEN + 1] = {0};
- int passlen = GetDlgItemTextA(hDlg,IDC_EDIT1,password,MAXPASSLEN+1);
+ int passlen = GetDlgItemTextA(hDlg,IDC_EDIT1,password,SIZEOF(password));
if (passlen == 0)
{
diff --git a/plugins/BossKeyPlus/src/Options.cpp b/plugins/BossKeyPlus/src/Options.cpp
index cbda2e1dd5..dd96a48fd7 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,1024);
+ GetDlgItemText(hwndDlg,IDC_MAINOPT_STATMSG,tszMsg,SIZEOF(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,MAXPASSLEN+1);
+ GetDlgItemTextA(hwndDlg,IDC_MAINOPT_PASS,szPass,SIZEOF(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,3);
+ GetDlgItemText(hwndDlg,IDC_MAINOPT_TIME,szMinutes,SIZEOF(szMinutes));
minutes = _ttoi(szMinutes);
if(minutes<1) minutes = 1;
db_set_b(NULL,MOD_NAME,"time",minutes);