summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_avatars.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-06-05 13:55:23 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-06-05 13:55:23 +0300
commit62a7bb9bc5069310a38c52d5f44d2a61267eed2c (patch)
treef9ba79193cbda23c3afe6060872f5e69ffac6436 /protocols/VKontakte/src/vk_avatars.cpp
parent11b0f497c9a7d13ea7caba9841d661f72389751c (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.cpp7
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);