summaryrefslogtreecommitdiff
path: root/protocols/Steam/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam/src')
-rw-r--r--protocols/Steam/src/steam_avatars.cpp6
-rw-r--r--protocols/Steam/src/steam_contacts.cpp18
2 files changed, 12 insertions, 12 deletions
diff --git a/protocols/Steam/src/steam_avatars.cpp b/protocols/Steam/src/steam_avatars.cpp
index 7b84a5fe0b..a8f40e5dde 100644
--- a/protocols/Steam/src/steam_avatars.cpp
+++ b/protocols/Steam/src/steam_avatars.cpp
@@ -44,8 +44,8 @@ void CSteamProto::CheckAvatarChange(MCONTACT hContact, std::string avatarUrl)
if (!hContact)
{
- PROTO_AVATAR_INFORMATION pai = { sizeof(pai) };
- if (GetAvatarInfo(update_required ? GAIF_FORCE : 0, (LPARAM)&pai) != GAIR_WAITFOR)
+ PROTO_AVATAR_INFORMATION ai = { 0 };
+ if (GetAvatarInfo(update_required ? GAIF_FORCE : 0, (LPARAM)&ai) != GAIR_WAITFOR)
CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
}
else if (update_required)
@@ -144,7 +144,7 @@ INT_PTR CSteamProto::GetMyAvatar(WPARAM wParam, LPARAM lParam)
TCHAR* buf = (TCHAR*)wParam;
int size = (int)lParam;
- PROTO_AVATAR_INFORMATION ai = { sizeof(ai) };
+ PROTO_AVATAR_INFORMATION ai = { 0 };
switch (GetAvatarInfo(0, (LPARAM)&ai)) {
case GAIR_SUCCESS:
_tcsncpy(buf, ai.filename, size);
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp
index fd43933e72..fa6f2c0965 100644
--- a/protocols/Steam/src/steam_contacts.cpp
+++ b/protocols/Steam/src/steam_contacts.cpp
@@ -520,28 +520,28 @@ void CSteamProto::OnGotUserSummaries(const NETLIBHTTPREQUEST *response)
void CSteamProto::OnGotAvatar(const NETLIBHTTPREQUEST *response, void *arg)
{
- PROTO_AVATAR_INFORMATION pai = { sizeof(pai) };
- pai.hContact = (MCONTACT)arg;
- GetDbAvatarInfo(pai);
+ PROTO_AVATAR_INFORMATION ai = { 0 };
+ ai.hContact = (MCONTACT)arg;
+ GetDbAvatarInfo(ai);
if (response == NULL || response->resultCode != HTTP_STATUS_OK)
{
- ptrA steamId(getStringA(pai.hContact, "SteamID"));
+ ptrA steamId(getStringA(ai.hContact, "SteamID"));
debugLogA("CSteamProto::OnGotAvatar: failed to get avatar %s", steamId);
- if (pai.hContact)
- ProtoBroadcastAck(pai.hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&pai, 0);
+ if (ai.hContact)
+ ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, 0);
return;
}
- FILE *fp = _tfopen(pai.filename, _T("wb"));
+ FILE *fp = _tfopen(ai.filename, _T("wb"));
if (fp)
{
fwrite(response->pData, sizeof(char), response->dataLength, fp);
fclose(fp);
- if (pai.hContact)
- ProtoBroadcastAck(pai.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&pai, 0);
+ if (ai.hContact)
+ ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, 0);
else
CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0);
}