summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_menu.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-04-04 21:33:45 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-04-04 21:33:45 +0300
commitc3e67a3b4e74a65c4a7d200ae6b24a386c2ad656 (patch)
tree56629d675871322b9fc140767a7c681f86f59675 /protocols/JabberG/src/jabber_menu.cpp
parent68ce4cecf6a93af18370383e504f09856cea5d5a (diff)
the stronger type check the better, also some large static arrays considered useless
Diffstat (limited to 'protocols/JabberG/src/jabber_menu.cpp')
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index 640315f3bb..f1cbdcbae9 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -1021,9 +1021,9 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM hContact, LPARAM
if (!m_bJabberOnline || !hContact)
return 0;
- char *jid, text[1024];
- ptrA tszJid(getUStringA(hContact, "jid"));
- if (tszJid == nullptr) {
+ CMStringA jid;
+ ptrA szJid(getUStringA(hContact, "jid"));
+ if (szJid == nullptr) {
ptrA roomid(getUStringA(hContact, "ChatRoomID"));
if (roomid == nullptr)
return 0;
@@ -1032,10 +1032,9 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM hContact, LPARAM
if (item == nullptr)
return 0;
- mir_snprintf(text, "%s/%s", item->jid, item->nick);
- jid = text;
+ jid = MakeJid(item->jid, item->nick);
}
- else jid = tszJid;
+ else jid = szJid;
CMStringW szValue;
if (EnterString(szValue, TranslateT("Status Message"), ESF_MULTILINE))