# HG changeset patch # User andrew.victor@mxit.com # Date 1314168330 0 # Node ID e4ae42f9da6818ce334210504183793e7de1cd71 # Parent 4fa86d2d1778841976c84ef2127c15737d29f39a# Parent 26f61ef1224b5c25ba4c4aed7554aa6f9d276d1a merge of 'b11803e108556a29e1204a3ff1fd00a0890d7733' and 'da7bc1419142f97b2def127ef42c9c7c562e77e3' diff -r 4fa86d2d1778 -r e4ae42f9da68 libpurple/protocols/mxit/login.c --- a/libpurple/protocols/mxit/login.c Wed Aug 24 03:52:06 2011 +0000 +++ b/libpurple/protocols/mxit/login.c Wed Aug 24 06:45:30 2011 +0000 @@ -53,13 +53,14 @@ struct MXitSession* session = NULL; /* currently the wapsite does not handle a '+' in front of the username (mxitid) so we just strip it */ - if ( account->username[0] == '+' ) { - char* fixed; + { + const char* username = purple_account_get_username( account ); - /* cut off the '+' */ - fixed = g_strdup( &account->username[1] ); - purple_account_set_username( account, fixed ); - g_free( fixed ); + if ( username[0] == '+' ) { + char* fixed = g_strdup( &username[1] ); + purple_account_set_username( account, fixed ); + g_free( fixed ); + } } session = g_new0( struct MXitSession, 1 );