summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/clist/clisttray.cpp10
1 files changed, 6 insertions, 4 deletions
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)