diff options
Diffstat (limited to 'protocols/FacebookRM/src/messages.cpp')
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index de6811cf2c..192ef1fb8c 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -114,11 +114,10 @@ void FacebookProto::SendChatMsgWorker(void *p) int FacebookProto::SendMsg(MCONTACT hContact, int flags, const char *msg) { // TODO: msg comes as Unicode (retyped wchar_t*), why should we convert it as ANSI to UTF-8? o_O - if (flags & PREF_UNICODE) - msg = mir_utf8encode(msg); + std::string message = (flags & PREF_UNICODE) ? ptrA(mir_utf8encode(msg)) : msg; facy.msgid_ = (facy.msgid_ % 1024) + 1; - ForkThread(&FacebookProto::SendMsgWorker, new send_direct(hContact, msg, (HANDLE)facy.msgid_)); + ForkThread(&FacebookProto::SendMsgWorker, new send_direct(hContact, message, (HANDLE)facy.msgid_)); return facy.msgid_; } |