diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-09-21 10:14:54 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-09-21 10:14:54 +0000 |
commit | f4e9e995a043f22f61ba885f5ff78f85d9eccf82 (patch) | |
tree | f6d7649a238db2ebde5e0c4dd09a37f046d5aefd /protocols/Tox/src/tox_contacts.cpp | |
parent | 4476536fd7fa8b15e4ba483033028c67fda8c35a (diff) |
Tox: fix in contact id converting
git-svn-id: http://svn.miranda-ng.org/main/trunk@10539 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_contacts.cpp')
-rw-r--r-- | protocols/Tox/src/tox_contacts.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 5abaaeb275..a2f6573713 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -50,10 +50,10 @@ bool CToxProto::IsMe(const std::string &id) MCONTACT CToxProto::FindContact(const std::string &id)
{
- DBVARIANT dbv;
MCONTACT hContact = NULL;
for (hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
{
+ DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, TOX_SETTINGS_ID, &dbv))
{
std::string clientId;
@@ -65,7 +65,7 @@ MCONTACT CToxProto::FindContact(const std::string &id) memcpy(&pubKey[0], dbv.pbVal, dbv.cpbVal);
clientId = DataToHexString(pubKey);
delSetting(hContact, TOX_SETTINGS_ID);
- setString(hContact, TOX_SETTINGS_ID, id.c_str());
+ setString(hContact, TOX_SETTINGS_ID, clientId.c_str());
}
else if (dbv.type == DBVT_ASCIIZ)
{
|