1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Fixed string handling on login message

This commit is contained in:
James Booth 2012-02-19 19:42:48 +00:00
parent a104c772e0
commit 9e5b89965f

View File

@ -150,8 +150,10 @@ static void _jabber_conn_handler(xmpp_conn_t * const conn,
xmpp_ctx_t *ctx = (xmpp_ctx_t *)userdata;
if (status == XMPP_CONN_CONNECT) {
char line[100];
sprintf(line, "%s logged in successfully.", xmpp_conn_get_jid(conn));
const char *jid = xmpp_conn_get_jid(conn);
const char *msg = " logged in successfully.";
char line[strlen(jid) + strlen(msg) + 2];
sprintf(line, "%s %s", xmpp_conn_get_jid(conn), msg);
title_bar_connected();
cons_good_show(line);