diff options
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;
|