diff options
author | George Hazan <ghazan@miranda.im> | 2018-06-05 13:55:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-06-05 13:55:23 +0300 |
commit | 62a7bb9bc5069310a38c52d5f44d2a61267eed2c (patch) | |
tree | f9ba79193cbda23c3afe6060872f5e69ffac6436 /protocols/VKontakte/src/vk_avatars.cpp | |
parent | 11b0f497c9a7d13ea7caba9841d661f72389751c (diff) |
VKontakte:
fix #1392 (access denied on typing for banned contacts)
fix ‘?’ in avatar filenames
Fingerprint: fixed Conversations detect
Diffstat (limited to 'protocols/VKontakte/src/vk_avatars.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_avatars.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp index af7e9680f4..64d8d53a3d 100644 --- a/protocols/VKontakte/src/vk_avatars.cpp +++ b/protocols/VKontakte/src/vk_avatars.cpp @@ -141,9 +141,14 @@ void CVkProto::GetAvatarFileName(MCONTACT hContact, wchar_t *pwszDest, size_t cb const wchar_t *szFileType = L".jpg";
ptrW wszUrl(getWStringA(hContact, "AvatarUrl"));
if (wszUrl) {
- wchar_t *p = wcsrchr(wszUrl, '.');
+ wchar_t *p = wcschr(wszUrl, '?');
+ if (p != nullptr)
+ *p = 0;
+
+ p = wcsrchr(wszUrl, '.');
if (p != nullptr)
szFileType = p;
+
}
LONG id = getDword(hContact, "ID", VK_INVALID_USER);
|