From 1147413314adde0812d1b94fb10a6da2a7ec7514 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 23 Aug 2014 20:45:50 +0000 Subject: Tox: fixed contact discovering git-svn-id: http://svn.miranda-ng.org/main/trunk@10316 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_contacts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 0806bc7b24..515aa13b3b 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -61,7 +61,7 @@ MCONTACT CToxProto::FindContact(const std::string &id) for (hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) { std::string contactId = ToxAddressToId(getStringA(hContact, TOX_SETTINGS_ID)); - if (id.compare(contactId)) + if (id.compare(contactId) == 0) { break; } @@ -121,7 +121,7 @@ void CToxProto::LoadContactList() tox_get_client_id(tox, friends[i], &clientId[0]); std::string id = DataToHexString(clientId); - MCONTACT hContact = AddContact(id.c_str()); + MCONTACT hContact = AddContact(id); if (hContact) { int size = tox_get_name_size(tox, friends[i]); -- cgit v1.2.3