From e5d977a8e28a301ea56e2786756537d03b84540a Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 31 May 2015 19:00:56 +0000 Subject: Tox: fixed contact adding git-svn-id: http://svn.miranda-ng.org/main/trunk@13948 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_contacts.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/Tox/src/tox_contacts.cpp') diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 8441573384..abf80745de 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -63,7 +63,7 @@ MCONTACT CToxProto::GetContact(const char *pubKey) return hContact; } -MCONTACT CToxProto::AddContact(const char *address, const TCHAR *nick, const TCHAR *dnsId, bool isTemporary) +MCONTACT CToxProto::AddContact(const char *address, const char *nick, const char *dnsId, bool isTemporary) { MCONTACT hContact = GetContact(address); if (!hContact) @@ -73,11 +73,11 @@ MCONTACT CToxProto::AddContact(const char *address, const TCHAR *nick, const TCH setString(hContact, TOX_SETTINGS_ID, address); - if (mir_tstrlen(nick)) - setTString(hContact, "Nick", dnsId); + if (mir_strlen(nick)) + setTString(hContact, "Nick", ptrT(mir_utf8decodeT(nick))); - if (mir_tstrlen(dnsId)) - setTString(hContact, TOX_SETTINGS_DNS, dnsId); + if (mir_strlen(dnsId)) + setTString(hContact, TOX_SETTINGS_DNS, ptrT(mir_utf8decodeT(dnsId))); DBVARIANT dbv; if (!getTString(TOX_SETTINGS_GROUP, &dbv)) -- cgit v1.2.3