summaryrefslogtreecommitdiff
path: root/protocols/Steam/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam/src')
-rw-r--r--protocols/Steam/src/steam_proto.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp
index 35bef1b6db..4b05b6c32d 100644
--- a/protocols/Steam/src/steam_proto.cpp
+++ b/protocols/Steam/src/steam_proto.cpp
@@ -109,17 +109,14 @@ MCONTACT CSteamProto::AddToList(int, PROTOSEARCHRESULT *psr)
MCONTACT CSteamProto::AddToListByEvent(int, int, MEVENT hDbEvent)
{
- DBEVENTINFO dbei = {};
- if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1))
- return NULL;
- if ((dbei.pBlob = (PBYTE)alloca(dbei.cbBlob)) == nullptr)
- return NULL;
+ DB::EventInfo dbei;
+ dbei.cbBlob = -1;
if (db_event_get(hDbEvent, &dbei))
- return NULL;
+ return 0;
if (mir_strcmp(dbei.szModule, m_szModuleName))
- return NULL;
+ return 0;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
- return NULL;
+ return 0;
DB::AUTH_BLOB blob(dbei.pBlob);
return AddContact(blob.get_email(), Utf2T(blob.get_nick()));