summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat/window.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-01 23:27:22 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-01 23:27:22 +0000
commit15b4d00e919d97015c208fff867862ef028995de (patch)
tree153c71d62dac1a17eaf469f52a6c2dfe9f7a28ae /plugins/TabSRMM/src/chat/window.cpp
parentcc15bc68febf4de6cd357ea9192de2e876ab290e (diff)
static mir_tstrncpy replaced with direct _tcsncpy_s calls
git-svn-id: http://svn.miranda-ng.org/main/trunk@11209 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/chat/window.cpp')
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index a0e5e2e4f5..1d30b7af89 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -1993,10 +1993,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
if (mir_tstrlen(szNick) > 0) {
if (M.GetByte("cuttitle", 0))
CutContactName(szNick, dat->newtitle, SIZEOF(dat->newtitle));
- else {
- mir_tstrncpy(dat->newtitle, szNick, SIZEOF(dat->newtitle));
- dat->newtitle[129] = 0;
- }
+ else
+ _tcsncpy_s(dat->newtitle, szNick, _TRUNCATE);
}
TCHAR szTemp[100];
@@ -2091,10 +2089,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
else {
if (si->ptszStatusbarText)
mir_sntprintf(szFinalStatusBarText, SIZEOF(szFinalStatusBarText), _T("%s %s"), mi->ptszModDispName, si->ptszStatusbarText);
- else {
- mir_tstrncpy(szFinalStatusBarText, mi->ptszModDispName, SIZEOF(szFinalStatusBarText));
- szFinalStatusBarText[511] = 0;
- }
+ else
+ _tcsncpy_s(szFinalStatusBarText, mi->ptszModDispName, _TRUNCATE);
}
SendMessage(dat->pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)szFinalStatusBarText);
UpdateStatusBar(dat);