diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2011-03-29 21:57:54 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2011-03-29 21:57:54 +0100 | 
| commit | 4f50ea5db021b6f627332592a7e43a06f3188172 (patch) | |
| tree | fff5d927e661b68f188426d67ee3d7ec601604f3 /protocols | |
| parent | ce81acd6242513c5fcf6cf2224f9b1137701e14e (diff) | |
Allow using the new 2-digit id's for retweets.
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/twitter/twitter.c | 4 | ||||
| -rw-r--r-- | protocols/twitter/twitter.h | 2 | 
2 files changed, 5 insertions, 1 deletions
| diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index f4230cf7..ce702f9c 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -507,7 +507,11 @@ static void twitter_handle_command( struct im_connection *ic, char *message )  		    ( tud = bu->data ) && tud->last_id )  			id = tud->last_id;  		else +		{  			id = g_ascii_strtoull( cmd[1], NULL, 10 ); +			if( id < TWITTER_LOG_LENGTH ) +				id = td->log[id].id; +		}  		td->last_status_id = 0;  		if( id ) diff --git a/protocols/twitter/twitter.h b/protocols/twitter/twitter.h index 1fddcbd1..5bce97d4 100644 --- a/protocols/twitter/twitter.h +++ b/protocols/twitter/twitter.h @@ -72,7 +72,7 @@ struct twitter_user_data  struct twitter_log_data  {  	guint64 id; -	struct bee_user *bu; +	struct bee_user *bu; /* DANGER: can be a dead pointer. Check it first. */  };  /** | 
