summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net.c b/net.c
index 6fbfa97..b3f0655 100644
--- a/net.c
+++ b/net.c
@@ -53,7 +53,7 @@ int net_addr(const char *url, struct addr *adr, enum protocol prot_default) {
 		char *colon = strchr(adr->host, ':');
 		if (colon) {
 			errno = 0;
-			int port = strtoul(colon, NULL, 10);
+			int port = strtoul(colon + 1, NULL, 10);
 			if (errno) {
 				return -1;
 			} else {