From 4bc66aeeacdc5c585a5816ef8aafffb787b05262 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 11 Jun 2011 18:59:39 +0100 Subject: Oops. prefix shouldn't be just "ca" for identi.ca. --- protocols/twitter/twitter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index 41eabc5a..692afcd2 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -282,7 +282,9 @@ static void twitter_login(account_t * acc) td->prefix = g_strdup(url.host); if (g_str_has_suffix(td->prefix, ".com")) td->prefix[strlen(url.host) - 4] = '\0'; - if ((s = strrchr(td->prefix, '.'))) { + if ((s = strrchr(td->prefix, '.')) && strlen(s) > 4) { + /* If we have at least 3 chars after the last dot, cut off the rest. + (mostly a www/api prefix or sth) */ s = g_strdup(s + 1); g_free(td->prefix); td->prefix = s; -- cgit v1.2.3