diff options
Diffstat (limited to 'plugins/TipperYM/src/popwin.cpp')
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 03682178bb..3b872e1a8b 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -105,15 +105,17 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa // logon info
TCHAR swzLogon[64];
if (TimestampToTimeDifference(NULL, pwd->clcit.szProto, "LogonTS", swzLogon, 59)) {
- _tcscat(swzLogon, TranslateT(" ago"));
- AddRow(pwd, TranslateT("Log on:"), swzLogon, NULL, false, false, false);
+ TCHAR ago[96];
+ mir_sntprintf(ago, SIZEOF(ago), TranslateT("%s ago"), swzLogon);
+ AddRow(pwd, TranslateT("Log on:"), ago, NULL, false, false, false);
}
// logoff info
TCHAR swzLogoff[64];
if (TimestampToTimeDifference(NULL, pwd->clcit.szProto, "LogoffTS", swzLogoff, 59)) {
- _tcscat(swzLogoff, TranslateT(" ago"));
- AddRow(pwd, TranslateT("Log off:"), swzLogoff, NULL, false, false, false);
+ TCHAR ago[96];
+ mir_sntprintf(ago, SIZEOF(ago), TranslateT("%s ago"), swzLogoff);
+ AddRow(pwd, TranslateT("Log off:"), ago, NULL, false, false, false);
}
// number of unread emails
@@ -1571,13 +1573,15 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (dwItems & TRAYTIP_LOGON) {
if (TimestampToTimeDifference(NULL, pa->szModuleName, "LogonTS", buff, 59)) {
- _tcscat(buff, TranslateT(" ago"));
- AddRow(pwd, TranslateT("Log on:"), buff, NULL, false, false, false);
+ TCHAR ago[96];
+ mir_sntprintf(ago, SIZEOF(ago), TranslateT("%s ago"), buff);
+ AddRow(pwd, TranslateT("Log on:"), ago, NULL, false, false, false);
}
if (TimestampToTimeDifference(NULL, pwd->clcit.szProto, "LogoffTS", buff, 59)) {
- _tcscat(buff, TranslateT(" ago"));
- AddRow(pwd, TranslateT("Log off:"), buff, NULL, false, false, false);
+ TCHAR ago[96];
+ mir_sntprintf(ago, SIZEOF(ago), TranslateT("%s ago"), buff);
+ AddRow(pwd, TranslateT("Log off:"), ago, NULL, false, false, false);
}
}
|