diff options
Diffstat (limited to 'protocols/MRA/src/Mra_functions.cpp')
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index a10ebcbaae..c01f69cf8a 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1083,16 +1083,17 @@ static void FakeThread(void* param) DWORD CMraProto::ProtoBroadcastAckAsync(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam, size_t paramSize)
{
- ACKDATA *ack = (ACKDATA *)::mir_calloc(sizeof(ACKDATA) + paramSize);
+ ACKDATA *ack = (ACKDATA*)::mir_calloc(sizeof(ACKDATA) + paramSize);
ack->cbSize = sizeof(ACKDATA);
ack->szModule = m_szModuleName;
ack->hContact = hContact;
ack->type = type;
ack->result = hResult;
ack->hProcess = hProcess;
- ack->lParam = lParam;
- if (paramSize)
- memcpy(ack+1, (void*)lParam, paramSize);
+ if (paramSize) {
+ ack->lParam = (LPARAM)(ack+1);
+ memcpy((void*)ack->lParam, (void*)lParam, paramSize);
+ }
mir_forkthread(FakeThread, ack);
return 0;
}
|