From 90e458dac28dc98d60ab00b35ddcfd09fb46811a Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 23 Jul 2013 19:23:02 +0000 Subject: replace sprintf to mir_snprintf (part 3) git-svn-id: http://svn.miranda-ng.org/main/trunk@5461 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clcopts.cpp | 14 +++++++------- plugins/Clist_modern/src/modern_clui.cpp | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins/Clist_modern/src') 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); diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 32823204d1..7376a2a363 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -1712,7 +1712,7 @@ LRESULT CLUI::PreProcessWndProc(UINT msg, WPARAM wParam, LPARAM lParam, BOOL& bH char szFilePath[MAX_PATH], szProfile[MAX_PATH]; CallService(MS_DB_GETPROFILEPATH,MAX_PATH,(LPARAM)&szFilePath ); CallService(MS_DB_GETPROFILENAME,MAX_PATH,(LPARAM)&szProfile ); - _snprintf((char*)hView, MAX_PATH, "%s\\%s", szFilePath, szProfile ); + mir_snprintf((char*)hView, MAX_PATH, "%s\\%s", szFilePath, szProfile ); UnmapViewOfFile( hView ); rc = 1; } -- cgit v1.2.3