Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
git-p4: tests: use test-chmtime in place of touch
[gitweb.git]
/
connect.c
diff --git
a/connect.c
b/connect.c
index ce0e1214234244236a407e9f3004e619d26c54a8..14c924b030cc17e083d4b8662faf5c6d48f68d85 100644
(file)
--- a/
connect.c
+++ b/
connect.c
@@
-310,6
+310,8
@@
static void get_host_and_port(char **host, const char **port)
if (end != colon + 1 && *end == '\0' && 0 <= portnr && portnr < 65536) {
*colon = 0;
*port = colon + 1;
+ } else if (!colon[1]) {
+ *colon = 0;
}
}
}