summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_opt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src/jabber_opt.cpp')
-rw-r--r--protocols/JabberG/src/jabber_opt.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp
index ec1062bc46..e2ac914ba5 100644
--- a/protocols/JabberG/src/jabber_opt.cpp
+++ b/protocols/JabberG/src/jabber_opt.cpp
@@ -332,15 +332,7 @@ CCtrlEditJid::CCtrlEditJid(CDlgBase* dlg, int ctrlId):
static void sttStoreJidFromUI(CJabberProto *ppro, CCtrlEdit &txtUsername, CCtrlCombo &cbServer)
{
- TCHAR *user = txtUsername.GetText();
- TCHAR *server = cbServer.GetText();
- int len = mir_tstrlen(user) + mir_tstrlen(server) + 2;
- TCHAR *jid = (TCHAR *)mir_alloc(len * sizeof(TCHAR));
- mir_sntprintf(jid, len, _T("%s@%s"), user, server);
- ppro->setTString("jid", jid);
- mir_free(jid);
- mir_free(server);
- mir_free(user);
+ ppro->setTString("jid", CMString(FORMAT, _T("%s@%s"), ptrT(txtUsername.GetText()), ptrT(cbServer.GetText())));
}
class CDlgOptAccount: public CJabberDlgBase