From c65f7c36a2aeacc008ac24881410168070544670 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 1 Sep 2014 13:46:57 +0000 Subject: forgotten prefix in clist tray git-svn-id: http://svn.miranda-ng.org/main/trunk@10354 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/clist/clisttray.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/modules/clist') diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp index a6daca2574..45f31f0e1a 100644 --- a/src/modules/clist/clisttray.cpp +++ b/src/modules/clist/clisttray.cpp @@ -84,14 +84,16 @@ TCHAR* fnTrayIconMakeTooltip(const TCHAR *szPrefix, const char *szProto) if (accounts.getCount() == 1) return cli.pfnTrayIconMakeTooltip(szPrefix, accounts[0]->szModuleName); + CMString tszTip; + if (szPrefix && szPrefix[0]) { - lstrcpyn(cli.szTip, szPrefix, MAX_TIP_SIZE); - if (!db_get_b(NULL, "CList", "AlwaysStatus", SETTING_ALWAYSSTATUS_DEFAULT)) + if (!db_get_b(NULL, "CList", "AlwaysStatus", SETTING_ALWAYSSTATUS_DEFAULT)) { + _tcsncpy_s(cli.szTip, MAX_TIP_SIZE, szPrefix, _TRUNCATE); return cli.szTip; + } + tszTip.Append(szPrefix); } - CMString tszTip; - for (int t = 0; t < accounts.getCount(); t++) { int i = cli.pfnGetAccountIndexByPos(t); if (i == -1) -- cgit v1.2.3