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/msgs.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/msgs.cpp')
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 4deb3f4b22..bea7f95208 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -584,13 +584,12 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, if (contactName && 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); + Utils::DoubleAmpersands(newcontactname); } - else mir_tstrncpy(newcontactname, _T("_U_"), SIZEOF(newcontactname)); + else _tcsncpy_s(newcontactname, _T("_U_"), _TRUNCATE); WORD wStatus = (szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(newData.hContact, szProto, "Status", ID_STATUS_OFFLINE)); TCHAR *szStatus = pcli->pfnGetStatusModeDescription(szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(newData.hContact, szProto, "Status", ID_STATUS_OFFLINE), 0); |