Make urldb_add_url IPv6-aware

svn path=/trunk/netsurf/; revision=10990
This commit is contained in:
Rob Kendrick 2010-12-04 22:46:33 +00:00
parent 73ace49c5a
commit ab704ba7a7

View File

@ -791,12 +791,13 @@ bool urldb_add_url(const char *url)
host++; host++;
/* get port and remove from host */ /* get port and remove from host */
colon = strrchr(host, ':'); port = 0;
if (!colon) { if (host[strlen(host)] != ']') {
port = 0; colon = strrchr(host, ':');
} else { if (colon) {
*colon = '\0'; *colon = '\0';
port = atoi(colon + 1); port = atoi(colon + 1);
}
} }
/* Get host entry */ /* Get host entry */