From 9242cbc94746fc871e71c20b6977e1bb2cfe9c3e Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 17 Aug 2014 18:57:11 +0000 Subject: Tox: - fixed friend names - some fixes with profile changing git-svn-id: http://svn.miranda-ng.org/main/trunk@10217 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_account.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'protocols/Tox/src/tox_account.cpp') diff --git a/protocols/Tox/src/tox_account.cpp b/protocols/Tox/src/tox_account.cpp index b4871425d2..f78f8b24a2 100644 --- a/protocols/Tox/src/tox_account.cpp +++ b/protocols/Tox/src/tox_account.cpp @@ -41,10 +41,11 @@ void CToxProto::InitToxCore() LoadToxData(); - std::vector username(TOX_MAX_NAME_LENGTH); + int size = tox_get_self_name_size(tox); + std::vector username(size); tox_get_self_name(tox, &username[0]); std::string nick(username.begin(), username.end()); - setString("Nick", nick.c_str()); + setWString("Nick", ptrW(Utf8DecodeW(nick.c_str()))); } void CToxProto::UninitToxCore() -- cgit v1.2.3