diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-01 23:27:22 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-01 23:27:22 +0000 |
commit | 15b4d00e919d97015c208fff867862ef028995de (patch) | |
tree | 153c71d62dac1a17eaf469f52a6c2dfe9f7a28ae /plugins/TabSRMM/src/chat/services.cpp | |
parent | cc15bc68febf4de6cd357ea9192de2e876ab290e (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/services.cpp')
-rw-r--r-- | plugins/TabSRMM/src/chat/services.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index ee7bf778b3..a34b7d0896 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -56,12 +56,10 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT if (mir_tstrlen(contactName) > 0) {
if (M.GetByte("cuttitle", 0))
CutContactName(contactName, newcontactname, SIZEOF(newcontactname));
- else {
- mir_tstrncpy(newcontactname, contactName, SIZEOF(newcontactname));
- newcontactname[127] = 0;
- }
+ else
+ _tcsncpy_s(newcontactname, contactName, _TRUNCATE);
}
- else mir_tstrncpy(newcontactname, _T("_U_"), SIZEOF(newcontactname));
+ else _tcsncpy_s(newcontactname, _T("_U_"), _TRUNCATE);
newData.item.pszText = newcontactname;
newData.item.mask = TCIF_TEXT | TCIF_IMAGE | TCIF_PARAM;
|