summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 39ad978519..1a70cecb22 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -1195,12 +1195,14 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK*
case IDM_RJID_ADD:
if (him->m_szRealJid && *him->m_szRealJid) {
- PROTOSEARCHRESULT psr = { 0 };
+ Utf2T jid(him->m_szRealJid);
+ PROTOSEARCHRESULT psr = {};
+ psr.flags = PSR_UNICODE;
psr.cbSize = sizeof(psr);
- psr.id.a = NEWSTR_ALLOCA(him->m_szRealJid);
- if (char *tmp = strchr(psr.id.a, '/'))
+ psr.id.w = jid;
+ if (auto *tmp = wcschr(psr.id.w, '/'))
*tmp = 0;
- psr.nick.a = psr.id.a;
+ psr.nick.w = psr.id.w;
Contact_AddBySearch(ppro->m_szModuleName, &psr, g_clistApi.hwndContactList);
}
break;