diff options
Diffstat (limited to 'protocols/WhatsApp')
-rw-r--r-- | protocols/WhatsApp/src/avatars.cpp | 14 | ||||
-rw-r--r-- | protocols/WhatsApp/src/contacts.cpp | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/protocols/WhatsApp/src/avatars.cpp b/protocols/WhatsApp/src/avatars.cpp index 3c5f10d102..35feb6d1ad 100644 --- a/protocols/WhatsApp/src/avatars.cpp +++ b/protocols/WhatsApp/src/avatars.cpp @@ -2,19 +2,19 @@ INT_PTR WhatsAppProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam)
{
- PROTO_AVATAR_INFORMATION* AI = (PROTO_AVATAR_INFORMATION*)lParam;
+ PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION*)lParam;
- ptrA id(getStringA(AI->hContact, isChatRoom(AI->hContact) ? "ChatRoomID" : WHATSAPP_KEY_ID));
+ ptrA id(getStringA(pai->hContact, isChatRoom(pai->hContact) ? "ChatRoomID" : WHATSAPP_KEY_ID));
if (id == NULL)
return GAIR_NOAVATAR;
- std::tstring tszFileName = GetAvatarFileName(AI->hContact);
- _tcsncpy_s(AI->filename, tszFileName.c_str(), _TRUNCATE);
- AI->format = PA_FORMAT_JPEG;
+ std::tstring tszFileName = GetAvatarFileName(pai->hContact);
+ _tcsncpy_s(pai->filename, tszFileName.c_str(), _TRUNCATE);
+ pai->format = PA_FORMAT_JPEG;
- ptrA szAvatarId(getStringA(AI->hContact, WHATSAPP_KEY_AVATAR_ID));
+ ptrA szAvatarId(getStringA(pai->hContact, WHATSAPP_KEY_AVATAR_ID));
if (szAvatarId == NULL || (wParam & GAIF_FORCE) != 0)
- if (AI->hContact != NULL && m_pConnection != NULL) {
+ if (pai->hContact != NULL && m_pConnection != NULL) {
m_pConnection->sendGetPicture(id, "image");
return GAIR_WAITFOR;
}
diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp index caa0771f5b..3756fded33 100644 --- a/protocols/WhatsApp/src/contacts.cpp +++ b/protocols/WhatsApp/src/contacts.cpp @@ -165,7 +165,7 @@ void WhatsAppProto::onSendGetPicture(const std::string &jid, const std::vector<u size_t r = fwrite(std::string(data.begin(), data.end()).c_str(), 1, data.size(), f);
fclose(f);
- PROTO_AVATAR_INFORMATION ai = { sizeof(ai) };
+ PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
ai.format = PA_FORMAT_JPEG;
_tcsncpy_s(ai.filename, filename.c_str(), _TRUNCATE);
|