diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-02 03:47:27 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-02 03:47:27 +0000 |
commit | 6e2b6b31bae6d69bff5271451e73eb08637b8118 (patch) | |
tree | ca636f1497e4cc6980736d56a7ff61e3a6f88079 /plugins/TabSRMM/src/trayicon.cpp | |
parent | d83beb598f0944dcb944524b1d27525dc320cf18 (diff) |
mir_sntprintf(..., _T("%s"), ...) -> _tcsncpy_s(..., ..., _TRUNCATE)
fix some x64 ptr truncations
git-svn-id: http://svn.miranda-ng.org/main/trunk@11211 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/trayicon.cpp')
-rw-r--r-- | plugins/TabSRMM/src/trayicon.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp index 0e792c6617..5a75484758 100644 --- a/plugins/TabSRMM/src/trayicon.cpp +++ b/plugins/TabSRMM/src/trayicon.cpp @@ -141,7 +141,7 @@ void TSAPI CreateSystrayIcon(int create) nim.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
nim.hIcon = PluginConfig.g_iconContainer;
nim.uCallbackMessage = DM_TRAYICONNOTIFY;
- mir_sntprintf(nim.szTip, 64, _T("%s"), _T("tabSRMM"));
+ _tcsncpy_s(nim.szTip, _T("tabSRMM"), _TRUNCATE);
if (create && !nen_options.bTrayExist) {
Shell_NotifyIcon(NIM_ADD, &nim);
nen_options.bTrayExist = TRUE;
@@ -230,11 +230,9 @@ void TSAPI AddContactToFavorites(MCONTACT hContact, const TCHAR *szNickname, con TCHAR szFinalNick[100];
if (szNickname == NULL)
- mir_sntprintf(szFinalNick, SIZEOF(szFinalNick), _T("%s"), pcli->pfnGetContactDisplayName(hContact, 0));
- else {
- _tcsncpy(szFinalNick, szNickname, 100);
- szFinalNick[99] = 0;
- }
+ _tcsncpy_s(szFinalNick, pcli->pfnGetContactDisplayName(hContact, 0), _TRUNCATE);
+ else
+ _tcsncpy_s(szFinalNick, szNickname, _TRUNCATE);
if (szProto == NULL)
szProto = GetContactProto(hContact);
|