diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-28 15:51:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-28 15:51:04 +0300 |
commit | ac6607c5f76566c2c840ca3955a22448738df9b3 (patch) | |
tree | b697dbe07b88ac8fefb5f00a003c95710b3bbbeb /protocols/Gadu-Gadu | |
parent | e787987f54733bd58f69ced43a506aa7fc42fb7c (diff) |
mir_urlDecode & mir_urlEncode to return CMStringA
Diffstat (limited to 'protocols/Gadu-Gadu')
-rw-r--r-- | protocols/Gadu-Gadu/src/avatar.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index ab7356ec0a..58ec424d37 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -384,17 +384,16 @@ void __cdecl GaduProto::setavatarthread(void *param) ptrA avatarFileB64(mir_base64_encode(avatarFile, avatarFileLen));
mir_free(avatarFile);
- ptrA avatarFileB64Enc(mir_urlEncode(avatarFileB64));
- size_t avatarFileB64EncLen = mir_strlen(avatarFileB64Enc);
+ CMStringA avatarFileB64Enc(mir_urlEncode(avatarFileB64));
char dataPrefix[64];
mir_snprintf(dataPrefix, "uin=%d&photo=", getDword(GG_KEY_UIN, 0));
size_t dataPrefixLen = mir_strlen(dataPrefix);
- size_t dataLen = dataPrefixLen + avatarFileB64EncLen;
+ size_t dataLen = dataPrefixLen + avatarFileB64Enc.GetLength();
char* data = (char*)mir_alloc(dataLen);
memcpy(data, dataPrefix, dataPrefixLen);
- memcpy(data + dataPrefixLen, avatarFileB64Enc, avatarFileB64EncLen);
+ memcpy(data + dataPrefixLen, avatarFileB64Enc, avatarFileB64Enc.GetLength());
//check if we have token, if no - receive new one
oauth_checktoken(0);
|