Commit 4fd32be01c79a5c003bb47674ac1d76d948518b7

Edward Thomson 2021-09-01T23:06:19

url: ensure minimum components for formatting

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/net.c b/src/net.c
index de28bf9..361e40e 100644
--- a/src/net.c
+++ b/src/net.c
@@ -401,8 +401,9 @@ void git_net_url_swap(git_net_url *a, git_net_url *b)
 
 int git_net_url_fmt(git_buf *buf, git_net_url *url)
 {
-	GIT_ASSERT_ARG(in->scheme);
-	GIT_ASSERT_ARG(in->host);
+	GIT_ASSERT_ARG(url);
+	GIT_ASSERT_ARG(url->scheme);
+	GIT_ASSERT_ARG(url->host);
 
 	git_buf_puts(buf, url->scheme);
 	git_buf_puts(buf, "://");