diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-03-21 09:36:10 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-03-21 09:36:10 +0100 |
commit | 7b07dc6cae23180e8a06b8663ced71fb4ace7775 (patch) | |
tree | b5d07c3b374f583287513aaee0064f4de6023447 /protocols/nogaim.c | |
parent | 87b6a3e49a764201011c8d9f802beddd82b86821 (diff) |
Fixed ugliness in serv_got_crap().
Diffstat (limited to 'protocols/nogaim.c')
-rw-r--r-- | protocols/nogaim.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 1ea68358..f9ee8a55 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -305,7 +305,7 @@ void hide_login_progress_error( struct gaim_connection *gc, char *msg ) void serv_got_crap( struct gaim_connection *gc, char *format, ... ) { va_list params; - char text[1024], buf[1024], acc_id[33]; + char text[1024], buf[1024], *acc_id; char *msg; account_t *a; @@ -330,11 +330,13 @@ void serv_got_crap( struct gaim_connection *gc, char *format, ... ) /* If we found one, add the screenname to the acc_id. */ if( a ) - g_snprintf( acc_id, 32, "%s(%s)", gc->prpl->name, gc->username ); + acc_id = g_strdup_printf( "%s(%s)", gc->prpl->name, gc->username ); else - g_snprintf( acc_id, 32, "%s", gc->prpl->name ); + acc_id = g_strdup( gc->prpl->name ); irc_usermsg( gc->irc, "%s - %s", acc_id, msg ); + + g_free( acc_id ); } static gboolean send_keepalive( gpointer d ) |