diff options
Diffstat (limited to 'protocols/IcqOscarJ/utilities.cpp')
-rw-r--r-- | protocols/IcqOscarJ/utilities.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/IcqOscarJ/utilities.cpp b/protocols/IcqOscarJ/utilities.cpp index 4f68ecb535..70f7547108 100644 --- a/protocols/IcqOscarJ/utilities.cpp +++ b/protocols/IcqOscarJ/utilities.cpp @@ -593,12 +593,10 @@ HANDLE CIcqProto::HContactFromUID(DWORD dwUin, const char *szUid, int *Added) HANDLE CIcqProto::HContactFromAuthEvent(HANDLE hEvent)
{
- DBEVENTINFO dbei;
+ DBEVENTINFO dbei = { sizeof(dbei) };
DWORD body[3];
- ZeroMemory(&dbei, sizeof(dbei));
- dbei.cbSize = sizeof(dbei);
- dbei.cbBlob = sizeof(DWORD) + sizeof(HANDLE);
+ dbei.cbBlob = sizeof(DWORD)*2;
dbei.pBlob = (PBYTE)&body;
if (CallService(MS_DB_EVENT_GET, (WPARAM)hEvent, (LPARAM)&dbei))
@@ -610,7 +608,7 @@ HANDLE CIcqProto::HContactFromAuthEvent(HANDLE hEvent) if (strcmpnull(dbei.szModule, m_szModuleName))
return INVALID_HANDLE_VALUE;
- return *(HANDLE*)&body[1]; // this is bad - needs new auth system
+ return DbGetAuthEventContact(&dbei);
}
char *NickFromHandle(HANDLE hContact)
|