diff options
-rw-r--r-- | src/mir_app/src/chat_log.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mir_app/src/chat_log.cpp b/src/mir_app/src/chat_log.cpp index 46b9d5be4a..5c0f4aed89 100644 --- a/src/mir_app/src/chat_log.cpp +++ b/src/mir_app/src/chat_log.cpp @@ -285,7 +285,7 @@ static void AddEventToBuffer(CMStringA &buf, LOGSTREAMDATA *streamData) wchar_t* MakeTimeStamp(wchar_t *pszStamp, time_t time)
{
- static wchar_t szTime[30];
+ static wchar_t szTime[100];
if (!wcsftime(szTime, _countof(szTime)-1, pszStamp, localtime(&time)))
wcsncpy_s(szTime, TranslateT("<invalid>"), _TRUNCATE);
return szTime;
@@ -343,10 +343,10 @@ char* Log_CreateRTF(LOGSTREAMDATA *streamData) //insert timestamp
if (g_Settings->bShowTime) {
- wchar_t szTimeStamp[30], szOldTimeStamp[30];
+ wchar_t szTimeStamp[100], szOldTimeStamp[100];
- mir_wstrncpy(szTimeStamp, MakeTimeStamp(g_Settings->pszTimeStamp, lin->time), 30);
- mir_wstrncpy(szOldTimeStamp, MakeTimeStamp(g_Settings->pszTimeStamp, si->LastTime), 30);
+ wcsncpy_s(szTimeStamp, MakeTimeStamp(g_Settings->pszTimeStamp, lin->time), _TRUNCATE);
+ wcsncpy_s(szOldTimeStamp, MakeTimeStamp(g_Settings->pszTimeStamp, si->LastTime), _TRUNCATE);
if (!g_Settings->bShowTimeIfChanged || si->LastTime == 0 || mir_wstrcmp(szTimeStamp, szOldTimeStamp)) {
si->LastTime = lin->time;
Log_AppendRTF(streamData, TRUE, buf, L"%s", szTimeStamp);
|