diff options
-rw-r--r-- | protocols/IcqOscarJ/src/icq_rates.cpp | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/oscar_filetransfer.cpp | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/stdpackets.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/protocols/IcqOscarJ/src/icq_rates.cpp b/protocols/IcqOscarJ/src/icq_rates.cpp index d71c0ada22..9ea1e9c70c 100644 --- a/protocols/IcqOscarJ/src/icq_rates.cpp +++ b/protocols/IcqOscarJ/src/icq_rates.cpp @@ -223,7 +223,7 @@ int rates::getLimitLevel(WORD wGroup, int nLevel) void rates::initAckPacket(icq_packet *pPacket)
{
- serverPacketInit(pPacket, 10 + nGroups * sizeof(WORD));
+ serverPacketInit(pPacket, 10 + WORD(nGroups * sizeof(WORD)));
packFNACHeader(pPacket, ICQ_SERVICE_FAMILY, ICQ_CLIENT_RATE_ACK);
for (WORD wGroup = 1; wGroup <= nGroups; wGroup++)
packWord(pPacket, wGroup);
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp index 673d072561..b1f5cb1af2 100644 --- a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp +++ b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp @@ -2090,7 +2090,7 @@ void CIcqProto::oft_sendPeerInit(oscar_connection *oc) ft->wEncoding = 2; // ucs-2
WCHAR *pwsThisFile = make_unicode_string(pszThisFileName);
SAFE_FREE((void**)&pszThisFileName);
- ft->cbRawFileName = strlennull(pwsThisFile) * sizeof(WCHAR) + 2;
+ ft->cbRawFileName = WORD(strlennull(pwsThisFile) * sizeof(WCHAR)) + 2;
if (ft->cbRawFileName < 64)
ft->cbRawFileName = 64;
ft->rawFileName = (char*)SAFE_MALLOC(ft->cbRawFileName);
diff --git a/protocols/IcqOscarJ/src/stdpackets.cpp b/protocols/IcqOscarJ/src/stdpackets.cpp index 735dbabcd7..e8f884a222 100644 --- a/protocols/IcqOscarJ/src/stdpackets.cpp +++ b/protocols/IcqOscarJ/src/stdpackets.cpp @@ -330,7 +330,7 @@ DWORD CIcqProto::icq_SendChannel1Message(DWORD dwUin, char *szUID, MCONTACT hCon DWORD CIcqProto::icq_SendChannel1MessageW(DWORD dwUin, char *szUID, MCONTACT hContact, WCHAR *pszText, cookie_message_data *pCookieData)
{
- WORD wMessageLen = strlennull(pszText) * sizeof(WCHAR);
+ WORD wMessageLen = WORD(strlennull(pszText) * sizeof(WCHAR));
DWORD dwCookie = AllocateCookie(CKT_MESSAGE, 0, hContact, (void*)pCookieData);
WORD wPacketLength = (pCookieData->nAckType == ACKTYPE_SERVER) ? 26 : 22;
|