diff options
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);
|