diff options
Diffstat (limited to 'protocols/Xfire')
-rw-r--r-- | protocols/Xfire/src/main.cpp | 14 | ||||
-rw-r--r-- | protocols/Xfire/src/processbuddyinfo.cpp | 10 |
2 files changed, 11 insertions, 13 deletions
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index ef2bd0e77f..15907ac515 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1782,17 +1782,15 @@ void SetAvatar(void *arg) if (xsa->hContact == NULL)
return;
- if (GetAvatar(xsa->username, &av))
- {
- PROTO_AVATAR_INFORMATION AI;
- AI.format = av.type;
- AI.hContact = xsa->hContact;
- mir_tstrcpy(AI.filename, _A2T(av.file));
- ProtoBroadcastAck(protocolname, xsa->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&AI, 0);
+ if (GetAvatar(xsa->username, &av)) {
+ PROTO_AVATAR_INFORMATION ai;
+ ai.format = av.type;
+ ai.hContact = xsa->hContact;
+ _tcsncpy_s(ai.filename, _A2T(av.file), _TRUNCATE);
+ ProtoBroadcastAck(protocolname, xsa->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, 0);
}
delete(xsa);
- //ReleaseMutex(hMutex);
lasttime -= sleep;
}
diff --git a/protocols/Xfire/src/processbuddyinfo.cpp b/protocols/Xfire/src/processbuddyinfo.cpp index 7d03146da4..26b9697d71 100644 --- a/protocols/Xfire/src/processbuddyinfo.cpp +++ b/protocols/Xfire/src/processbuddyinfo.cpp @@ -90,11 +90,11 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo, MCONTACT hcontact, c {
db_set_dw(hcontact, "ContactPhoto", "XFireAvatarId", buddyinfo->avatarid);
db_set_b(hcontact, "ContactPhoto", "XFireAvatarMode", buddyinfo->avatarmode);
- PROTO_AVATAR_INFORMATION AI;
- AI.format = type;
- AI.hContact = hcontact;
- mir_tstrcpy(AI.filename, _A2T(filename));
- ProtoBroadcastAck(protocolname, hcontact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&AI, 0);
+ PROTO_AVATAR_INFORMATION ai;
+ ai.format = type;
+ ai.hContact = hcontact;
+ _tcsncpy_s(ai.filename, _A2T(filename), _TRUNCATE);
+ ProtoBroadcastAck(protocolname, hcontact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, 0);
}
else //eigenen avatar setzen
{
|