diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-09 00:59:27 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-09 00:59:27 +0000 |
commit | 36472b00443e23acf28b0dd26ddc2c2e6216d909 (patch) | |
tree | a526bbc6d309e05f1728b772620c9272f9ab8c4a /protocols/IRCG/src/windows.cpp | |
parent | 163ce5127e5c8244bccbdae72107ad101f70575f (diff) |
code cleanup over mir_sntprintf + small bug fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@11295 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG/src/windows.cpp')
-rw-r--r-- | protocols/IRCG/src/windows.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index 136ee34f50..3cdb907f98 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -970,7 +970,7 @@ void CManagerDlg::OnAdd(CCtrlButton*) TCHAR temp2[450];
TCHAR window[256];
GetDlgItemText(m_hwnd, IDC_CAPTION, window, SIZEOF(window));
- mir_sntprintf(temp2, 450, _T("/MODE %s %s %s"), window, mode, _T("%question"));
+ mir_sntprintf(temp2, SIZEOF(temp2), _T("/MODE %s %s %s"), window, mode, _T("%question"));
SetDlgItemText(addban_hWnd, IDC_HIDDENEDIT, temp2);
dlg->Activate();
}
@@ -1013,7 +1013,7 @@ void CManagerDlg::OnEdit(CCtrlButton*) TCHAR temp2[450];
TCHAR window[256];
GetDlgItemText(m_hwnd, IDC_CAPTION, window, SIZEOF(window));
- mir_sntprintf(temp2, 450, _T("/MODE %s -%s %s%s/MODE %s +%s %s"), window, mode, user.c_str(), _T("%newl"), window, mode, _T("%question"));
+ mir_sntprintf(temp2, SIZEOF(temp2), _T("/MODE %s -%s %s%s/MODE %s +%s %s"), window, mode, user.c_str(), _T("%newl"), window, mode, _T("%question"));
SetDlgItemText(addban_hWnd, IDC_HIDDENEDIT, temp2);
dlg->Activate();
}
@@ -1192,9 +1192,9 @@ void CManagerDlg::OnApplyModes(CCtrlButton*) mir_tstrcat(temp, window);
mir_tstrcat(temp, _T(" "));
if (mir_tstrlen(toremove))
- mir_sntprintf(temp, 499, _T("%s-%s"), temp, toremove);
+ mir_sntprintf(temp, SIZEOF(temp), _T("%s-%s"), temp, toremove);
if (mir_tstrlen(toadd))
- mir_sntprintf(temp, 499, _T("%s+%s"), temp, toadd);
+ mir_sntprintf(temp, SIZEOF(temp), _T("%s+%s"), temp, toadd);
if (!appendixremove.IsEmpty())
mir_tstrcat(temp, appendixremove.c_str());
if (!appendixadd.IsEmpty())
|