summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_avatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MSN/src/msn_avatar.cpp')
-rw-r--r--protocols/MSN/src/msn_avatar.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/MSN/src/msn_avatar.cpp b/protocols/MSN/src/msn_avatar.cpp
index 199de8d362..9ca0fbadc3 100644
--- a/protocols/MSN/src/msn_avatar.cpp
+++ b/protocols/MSN/src/msn_avatar.cpp
@@ -76,20 +76,20 @@ LBL_Error:
if (fmt == PA_FORMAT_UNKNOWN)
goto LBL_Error;
- PROTO_AVATAR_INFORMATION AI = { sizeof(AI) };
- AI.format = fmt;
- AI.hContact = p->hContact;
- MSN_GetAvatarFileName(AI.hContact, AI.filename, SIZEOF(AI.filename), szExt);
- _tremove(AI.filename);
+ PROTO_AVATAR_INFORMATION ai = { 0 };
+ ai.format = fmt;
+ ai.hContact = p->hContact;
+ MSN_GetAvatarFileName(ai.hContact, ai.filename, SIZEOF(ai.filename), szExt);
+ _tremove(ai.filename);
- int fileId = _topen(AI.filename, _O_CREAT | _O_TRUNC | _O_WRONLY | O_BINARY, _S_IREAD | _S_IWRITE);
+ int fileId = _topen(ai.filename, _O_CREAT | _O_TRUNC | _O_WRONLY | O_BINARY, _S_IREAD | _S_IWRITE);
if (fileId == -1)
goto LBL_Error;
_write(fileId, nlhrReply->pData, (unsigned)nlhrReply->dataLength);
_close(fileId);
- ProtoBroadcastAck(p->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &AI, 0);
+ ProtoBroadcastAck(p->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &ai, 0);
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)nlhrReply);
return true;
}