From 1ce3da1cca093143d9629bc46e221dd8be962e12 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 31 May 2015 11:46:05 +0000 Subject: - MAllStrings: a handy union to hold an incoming string parameter of any type; - FNAMECHAR: atavism extincted; - PROTOSEARCHRESULT: structure prepared to use results of any type, including utf git-svn-id: http://svn.miranda-ng.org/main/trunk@13932 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IcqOscarJ/src/fam_04message.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'protocols/IcqOscarJ/src/fam_04message.cpp') diff --git a/protocols/IcqOscarJ/src/fam_04message.cpp b/protocols/IcqOscarJ/src/fam_04message.cpp index 5ceaf78eae..9715065269 100644 --- a/protocols/IcqOscarJ/src/fam_04message.cpp +++ b/protocols/IcqOscarJ/src/fam_04message.cpp @@ -950,8 +950,8 @@ void CIcqProto::handleRecvServMsgContacts(BYTE *buf, size_t wLen, DWORD dwUin, c contacts[iContact] = (ICQSEARCHRESULT*)SAFE_MALLOC(sizeof(ICQSEARCHRESULT)); contacts[iContact]->hdr.cbSize = sizeof(ICQSEARCHRESULT); contacts[iContact]->hdr.flags = PSR_TCHAR; - contacts[iContact]->hdr.nick = null_strdup(_T("")); - contacts[iContact]->hdr.id = ansi_to_tchar(szUid); + contacts[iContact]->hdr.nick.t = null_strdup(_T("")); + contacts[iContact]->hdr.id.t = ansi_to_tchar(szUid); if (IsStringUIN(szUid)) { // icq contact contacts[iContact]->uin = atoi(szUid); @@ -978,8 +978,8 @@ void CIcqProto::handleRecvServMsgContacts(BYTE *buf, size_t wLen, DWORD dwUin, c debugLogA("Malformed '%s' message", "contacts"); disposeChain(&chain); for (int i = 0; i < iContact; i++) { - SAFE_FREE(&contacts[i]->hdr.id); - SAFE_FREE(&contacts[i]->hdr.nick); + SAFE_FREE(&contacts[i]->hdr.id.t); + SAFE_FREE(&contacts[i]->hdr.nick.t); SAFE_FREE((void**)&contacts[i]); } SAFE_FREE((void**)&contacts); @@ -1017,8 +1017,8 @@ void CIcqProto::handleRecvServMsgContacts(BYTE *buf, size_t wLen, DWORD dwUin, c unpackTypedTLV(pBuffer, wNickLen, 0x01, &wNickTLV, &wNickTLVLen, (LPBYTE*)&pNick); if (wNickTLV == 0x01) { - SAFE_FREE(&contacts[iContact]->hdr.nick); - contacts[iContact]->hdr.nick = utf8_to_tchar(pNick); + SAFE_FREE(&contacts[iContact]->hdr.nick.t); + contacts[iContact]->hdr.nick.t = utf8_to_tchar(pNick); } else SAFE_FREE(&pNick); @@ -1053,8 +1053,8 @@ void CIcqProto::handleRecvServMsgContacts(BYTE *buf, size_t wLen, DWORD dwUin, c } for (int i = 0; i < iContact; i++) { - SAFE_FREE(&contacts[i]->hdr.id); - SAFE_FREE(&contacts[i]->hdr.nick); + SAFE_FREE(&contacts[i]->hdr.id.t); + SAFE_FREE(&contacts[i]->hdr.nick.t); SAFE_FREE((void**)&contacts[i]); } SAFE_FREE((void**)&contacts); @@ -1694,8 +1694,8 @@ void CIcqProto::handleMessageTypes(DWORD dwUin, char *szUID, DWORD dwTimestamp, if (!mir_strlen(pszMsgField[1 + i * 2])) valid = 0; } - isrList[i]->hdr.id = ansi_to_tchar(pszMsgField[1 + i * 2]); - isrList[i]->hdr.nick = ansi_to_tchar(pszMsgField[2 + i * 2]); + isrList[i]->hdr.id.t = ansi_to_tchar(pszMsgField[1 + i * 2]); + isrList[i]->hdr.nick.t = ansi_to_tchar(pszMsgField[2 + i * 2]); } if (!valid) @@ -1712,8 +1712,8 @@ void CIcqProto::handleMessageTypes(DWORD dwUin, char *szUID, DWORD dwTimestamp, } for (int i = 0; i < nContacts; i++) { - SAFE_FREE(&isrList[i]->hdr.id); - SAFE_FREE(&isrList[i]->hdr.nick); + SAFE_FREE(&isrList[i]->hdr.id.t); + SAFE_FREE(&isrList[i]->hdr.nick.t); SAFE_FREE((void**)&isrList[i]); } } -- cgit v1.2.3