diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-17 23:04:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-19 19:24:16 +0300 |
commit | 2e125090810014fa46cd9bb27b2e4daea32ba2f4 (patch) | |
tree | 6b8d6ea72c0adeb7c9ba2a6e01490d6437fa94f6 /protocols/Discord/src | |
parent | b04db4768abe18ae03e3f9b6f9d7be569d9f14a9 (diff) |
MIME types are of type char, not wchar_t
Diffstat (limited to 'protocols/Discord/src')
-rw-r--r-- | protocols/Discord/src/avatars.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Discord/src/avatars.cpp b/protocols/Discord/src/avatars.cpp index 150bc39ac6..19a8adc158 100644 --- a/protocols/Discord/src/avatars.cpp +++ b/protocols/Discord/src/avatars.cpp @@ -71,7 +71,7 @@ LBL_Error: for (int i = 0; i < reply->headersCount; i++) if (!mir_strcmp(reply->headers[i].szName, "Content-Type")) { - ai.format = ProtoGetAvatarFormatByMimeType(_A2T(reply->headers[i].szValue)); + ai.format = ProtoGetAvatarFormatByMimeType(reply->headers[i].szValue); break; } @@ -170,12 +170,12 @@ INT_PTR CDiscordProto::SetMyAvatar(WPARAM, LPARAM lParam) CMStringA szPayload("data:"); - const wchar_t *wszMimeType = ProtoGetAvatarMimeType(ProtoGetAvatarFileFormat(pwszFilename)); - if (wszMimeType == nullptr) { + const char *szMimeType = ProtoGetAvatarMimeType(ProtoGetAvatarFileFormat(pwszFilename)); + if (szMimeType == nullptr) { debugLogA("invalid file format for avatar %S", pwszFilename); return 1; } - szPayload.AppendFormat("%S;base64,", wszMimeType); + szPayload.AppendFormat("%s;base64,", szMimeType); FILE *in = _wfopen(pwszFilename, L"rb"); if (in == nullptr) { debugLogA("cannot open avatar file %S for reading", pwszFilename); |