From c8711bcc5e14c970439e208ee5c05b420bf14259 Mon Sep 17 00:00:00 2001 From: aunsane Date: Sat, 25 Feb 2017 14:58:44 +0300 Subject: Tox: fixed friend add --- protocols/Tox/src/tox_proto.cpp | 2 +- protocols/Tox/src/tox_search.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'protocols/Tox/src') diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index e441cd7655..5209e3ef92 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -73,7 +73,7 @@ MCONTACT CToxProto::AddToList(int flags, PROTOSEARCHRESULT *psr) ShowNotification(TranslateT("Contact already in your contact list"), 0, hContact); return NULL; } - return AddContact(T2Utf(psr->id.w), T2Utf(psr->nick.w), T2Utf(psr->email.w), flags & PALF_TEMPORARY); + return AddContact(psr->id.a, psr->nick.a, psr->email.a, flags & PALF_TEMPORARY); } int CToxProto::Authorize(MEVENT hDbEvent) diff --git a/protocols/Tox/src/tox_search.cpp b/protocols/Tox/src/tox_search.cpp index d2afffc717..41c63b85a1 100644 --- a/protocols/Tox/src/tox_search.cpp +++ b/protocols/Tox/src/tox_search.cpp @@ -232,6 +232,7 @@ HWND CToxProto::OnSearchAdvanced(HWND owner) std::string address = match[1]; PROTOSEARCHRESULT psr = { sizeof(psr) }; + psr.flags = PSR_UTF8; psr.id.a = mir_strdup(query.c_str()); ADDCONTACTSTRUCT acs = { HANDLE_SEARCHRESULT }; -- cgit v1.2.3