summaryrefslogtreecommitdiff
path: root/plugins/TipperYM/src/options.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-02-28 11:05:09 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-02-28 11:05:09 +0000
commitb1530a48bd67d19f6a18355e04a884b36c696e8b (patch)
tree539cc8c4387b586658898a146b8876cc133f8783 /plugins/TipperYM/src/options.cpp
parent4e2a8eb11a9a4286eb0bcb3386bab58e87ae4b69 (diff)
Tipper:
- minor bugfixes git-svn-id: http://svn.miranda-ng.org/main/trunk@12284 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM/src/options.cpp')
-rw-r--r--plugins/TipperYM/src/options.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp
index 2fb412bfae..f65d2fdf5a 100644
--- a/plugins/TipperYM/src/options.cpp
+++ b/plugins/TipperYM/src/options.cpp
@@ -554,7 +554,7 @@ void LoadOptions()
{
if (!db_get_ts(NULL, MODULE, "SkinName", &dbv))
{
- _tcscpy(opt.szSkinName, dbv.ptszVal);
+ _tcsncpy(opt.szSkinName, dbv.ptszVal,SIZEOF(opt.szSkinName)-1);
db_free(&dbv);
}
}
@@ -989,10 +989,10 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
_tcscpy(ds_value->ds.swzName, subst->swzName);
if (ds_value->ds.type == DVT_DB && subst->szModuleName)
- strcpy(ds_value->ds.szModuleName, subst->szModuleName);
+ strncpy(ds_value->ds.szModuleName, subst->szModuleName, SIZEOF(ds_value->ds.szModuleName) - 1);
if (subst->szSettingName)
- strcpy(ds_value->ds.szSettingName, subst->szSettingName);
+ strncpy(ds_value->ds.szSettingName, subst->szSettingName, SIZEOF(ds_value->ds.szSettingName) - 1);
ds_value->ds.iTranslateFuncId = subst->iTranslateFuncId;
@@ -1474,8 +1474,7 @@ INT_PTR CALLBACK DlgProcOptsAppearance(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (((LPNMHDR)lParam)->code == (unsigned)PSN_APPLY)
{
BOOL trans;
- int new_val;
- new_val = GetDlgItemInt(hwndDlg, IDC_ED_WIDTH, &trans, FALSE);
+ int new_val = GetDlgItemInt(hwndDlg, IDC_ED_WIDTH, &trans, FALSE);
if (trans) opt.iWinWidth = new_val;
new_val = GetDlgItemInt(hwndDlg, IDC_ED_MINWIDTH, &trans, FALSE);
if (trans) opt.iMinWidth = new_val;