Test for repo before removing leading colon

This commit is contained in:
Isaac Kearse 2013-09-10 05:16:52 +12:00
parent fbabe855ad
commit b345026baa

View File

@ -51,7 +51,7 @@ static int gen_proto(git_buf *request, const char *cmd, const char *url)
repo = strchr(url, '/'); repo = strchr(url, '/');
} else { } else {
repo = strchr(url, ':'); repo = strchr(url, ':');
repo++; if (repo) repo++;
} }
if (!repo) { if (!repo) {