diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-07-23 19:23:02 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-07-23 19:23:02 +0000 |
commit | 90e458dac28dc98d60ab00b35ddcfd09fb46811a (patch) | |
tree | dc598dd8f32d8ecf14989d54d325ae11502bb8d8 /plugins/Clist_modern/src/modern_clcopts.cpp | |
parent | 3b05e84e27e50e8b44cb86cbc0a8eb1b639d7223 (diff) |
replace sprintf to mir_snprintf (part 3)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5461 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcopts.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clcopts.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 8866f1f071..92184f0c75 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -146,7 +146,7 @@ void RegisterCLUIFonts( void ) _tcsncpy(fontid.group, fontOptionsList[i].szGroup, SIZEOF(fontid.group));
_tcsncpy(fontid.name, fontOptionsList[i].szDescr, SIZEOF(fontid.name));
- sprintf(idstr, "Font%d", fontOptionsList[i].fontID);
+ mir_snprintf(idstr, SIZEOF(idstr), "Font%d", fontOptionsList[i].fontID);
strncpy(fontid.prefix, idstr, SIZEOF(fontid.prefix));
fontid.order = i+1;
@@ -160,7 +160,7 @@ void RegisterCLUIFonts( void ) _tcsncpy(effectid.group, fontOptionsList[i].szGroup, SIZEOF(effectid.group));
_tcsncpy(effectid.name, fontOptionsList[i].szDescr, SIZEOF(effectid.name));
- sprintf(idstr, "Font%d", fontOptionsList[i].fontID);
+ mir_snprintf(idstr, SIZEOF(idstr), "Font%d", fontOptionsList[i].fontID);
strncpy(effectid.setting, idstr, SIZEOF(effectid.setting));
effectid.order = i + 1;
@@ -1220,7 +1220,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING, 0, (LPARAM)MIRANDANAME);
char szUin[20];
- sprintf(szUin,"%u",db_get_dw(NULL,"ICQ","UIN",0));
+ mir_snprintf(szUin, SIZEOF(szUin), "%u", db_get_dw(NULL, "ICQ", "UIN", 0));
SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING, 0, (LPARAM)szUin);
if ( !db_get_s(NULL,"ICQ","Nick",&dbv)) {
@@ -1326,9 +1326,9 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP case WM_HSCROLL:
{ char str[10];
- sprintf(str,"%d%%",100*SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_GETPOS, 0, 0)/255);
+ mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0) / 255);
SetDlgItemTextA(hwndDlg,IDC_INACTIVEPERC,str);
- sprintf(str,"%d%%",100*SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS, 0, 0)/255);
+ mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0) / 255);
SetDlgItemTextA(hwndDlg,IDC_ACTIVEPERC,str);
}
if (wParam != 0x12345678) SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
@@ -1937,9 +1937,9 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar case WM_HSCROLL:
{
char str[10];
- sprintf(str,"%d%%",100*SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_GETPOS, 0, 0)/255);
+ mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0) / 255);
SetDlgItemTextA(hwndDlg,IDC_INACTIVEPERC,str);
- sprintf(str,"%d%%",100*SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS, 0, 0)/255);
+ mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0) / 255);
SetDlgItemTextA(hwndDlg,IDC_ACTIVEPERC,str);
if (wParam != 0x12345678)
if ( !bInit) SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
|