diff options
Diffstat (limited to 'protocols/Tox/src/tox_services.cpp')
-rw-r--r-- | protocols/Tox/src/tox_services.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_services.cpp b/protocols/Tox/src/tox_services.cpp index 3b5ba18395..f42a3d35c0 100644 --- a/protocols/Tox/src/tox_services.cpp +++ b/protocols/Tox/src/tox_services.cpp @@ -3,10 +3,11 @@ INT_PTR CToxProto::SetMyNickname(WPARAM wParam, LPARAM lParam)
{
ptrT nickname((wParam & SMNN_UNICODE) ? mir_u2t((TCHAR*)lParam) : mir_a2t((char*)lParam));
-
setTString("Nick", nickname);
+
+ T2Utf szNick8(nickname);
TOX_ERR_SET_INFO error;
- if (!tox_self_set_name(tox, (uint8_t*)(char*)ptrA(mir_utf8encodeT(nickname)), mir_tstrlen(nickname), &error))
+ if (!tox_self_set_name(tox, szNick8, mir_strlen(szNick8), &error))
{
debugLogA(__FUNCTION__": failed to set nick name");
return 1;
|