summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype/src/skype_proto.cpp')
-rw-r--r--protocols/Skype/src/skype_proto.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp
index a8b1c0a315..687ccbf222 100644
--- a/protocols/Skype/src/skype_proto.cpp
+++ b/protocols/Skype/src/skype_proto.cpp
@@ -282,24 +282,21 @@ int __cdecl CSkypeProto::RecvMsg(HANDLE hContact, PROTORECVEVENT* pre)
::db_unset(hContact, "CList", "Hidden");
this->UserIsTyping(hContact, PROTOTYPE_SELFTYPING_OFF);
- char *guid = (char *)pre->lParam;
- int guidLen = (int)::strlen(guid);
+ SEBinary *guid = (SEBinary*)pre->lParam;
char *message = (char *)pre->szMessage;
- int msgLen = (int)::strlen(message) + 1;
+ size_t msgLen = ::strlen(message) + 1;
- message = (char *)::mir_realloc(message, msgLen + guidLen);
- ::memcpy((char *)&message[msgLen], guid, guidLen);
+ message = (char *)::mir_realloc(message, msgLen + guid->size());
+ ::memcpy((char *)&message[msgLen], guid->data(), guid->size());
return (INT_PTR)this->AddDBEvent(
hContact,
EVENTTYPE_MESSAGE,
pre->timestamp,
DBEF_UTF | ((pre->flags & PREF_CREATEREAD) ? DBEF_READ : 0),
- msgLen + guidLen,
+ DWORD(msgLen + guid->size()),
(PBYTE)message);
-
- //return ::Proto_RecvMessage(hContact, pre);
}
int __cdecl CSkypeProto::RecvUrl(HANDLE hContact, PROTORECVEVENT *) { return 0; }