From 6035c2ae283bd8743a7484ed8796bd845afec4d5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Sep 2012 11:45:24 +0000 Subject: fix for status messages git-svn-id: http://svn.miranda-ng.org/main/trunk@1679 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/MraProto.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/MRA/MraProto.cpp') diff --git a/protocols/MRA/MraProto.cpp b/protocols/MRA/MraProto.cpp index 5b4ea2ac4e..4694f956bb 100644 --- a/protocols/MRA/MraProto.cpp +++ b/protocols/MRA/MraProto.cpp @@ -715,20 +715,20 @@ HANDLE CMraProto::GetAwayMsg(HANDLE hContact) if (!m_bLoggedIn || ! hContact) return 0; - CHAR szStatusDesc[MICBLOG_STATUS_MAX+MICBLOG_STATUS_MAX+MAX_PATH], szBlogStatus[MICBLOG_STATUS_MAX+4], szTime[64]; + TCHAR szStatusDesc[MICBLOG_STATUS_MAX+MICBLOG_STATUS_MAX+MAX_PATH], szBlogStatus[MICBLOG_STATUS_MAX+4], szTime[64]; DWORD dwTime; size_t dwStatusDescSize; int iRet = 0; - SYSTEMTIME stBlogStatusTime = {0}; - if ( mraGetStaticStringA(hContact, DBSETTING_BLOGSTATUS, szBlogStatus, SIZEOF(szBlogStatus), NULL)) { + if ( mraGetStaticStringW(hContact, DBSETTING_BLOGSTATUS, szBlogStatus, SIZEOF(szBlogStatus), NULL)) { + SYSTEMTIME tt = {0}; dwTime = mraGetDword(hContact, DBSETTING_BLOGSTATUSTIME, 0); - if (dwTime && MakeLocalSystemTimeFromTime32(dwTime, &stBlogStatusTime)) - mir_snprintf(szTime, SIZEOF(szTime), "%04ld.%02ld.%02ld %02ld:%02ld: ", stBlogStatusTime.wYear, stBlogStatusTime.wMonth, stBlogStatusTime.wDay, stBlogStatusTime.wHour, stBlogStatusTime.wMinute); + if (dwTime && MakeLocalSystemTimeFromTime32(dwTime, &tt)) + mir_sntprintf(szTime, SIZEOF(szTime), _T("%04ld.%02ld.%02ld %02ld:%02ld: "), tt.wYear, tt.wMonth, tt.wDay, tt.wHour, tt.wMinute); else szTime[0] = 0; - dwStatusDescSize = mir_snprintf(szStatusDesc, SIZEOF(szStatusDesc), "%s%s", szTime, szBlogStatus); + dwStatusDescSize = mir_sntprintf(szStatusDesc, SIZEOF(szStatusDesc), _T("%s%s"), szTime, szBlogStatus); iRet = GetTickCount(); ProtoBroadcastAckAsynchEx(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)iRet, (LPARAM)szStatusDesc, dwStatusDescSize); } -- cgit v1.2.3