# HG changeset patch # User andrew.victor@mxit.com # Date 1314254404 0 # Node ID e86e00f77ca4dd4b1c4060d6c54dc900b137bf3b # Parent 16b33ffd75f81a45045b1100c8fa236a8907711c# Parent e4ae42f9da6818ce334210504183793e7de1cd71 merge of '832455fec73731ef93c992a46f78b79981bb4105' and '9d78a21f49219b234b21c2dd2023c4ad160a2c9c' diff -r 16b33ffd75f8 -r e86e00f77ca4 libpurple/protocols/mxit/login.c --- a/libpurple/protocols/mxit/login.c Thu Aug 25 04:40:34 2011 +0000 +++ b/libpurple/protocols/mxit/login.c Thu Aug 25 06:40:04 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 );