diff -r 24dcb476e62b -r ab9790d588f9 libpurple/proxy.c --- a/libpurple/proxy.c Wed Apr 21 19:07:19 2010 +0000 +++ b/libpurple/proxy.c Thu Apr 22 03:09:15 2010 +0000 @@ -379,11 +379,16 @@ char *d; d = g_strrstr(host, ":"); - if (d) + if (d) { *d = '\0'; - d++; - if (*d) - sscanf(d, "%d", &port); + + d++; + if (*d) + sscanf(d, "%d", &port); + + if (port == 0) + port = default_port; + } purple_proxy_info_set_host(info, host); purple_proxy_info_set_port(info, port);