Subject: [PATCH 3/3] submodule-config: fix test binary crashing when no arguments given

From: Heiko Voigt <[email-masked]>
Date: Thu, 28 Jul 2016 14:50:05 +0200

Since arg[0] will be NULL without any argument here and starts_with()
does not like NULL-pointers.

Signed-off-by: Heiko Voigt <[email-masked]>
---
A small fix I found while developing the test.

 test-submodule-config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test-submodule-config.c b/test-submodule-config.c
index dab8c27..a4e4098 100644
--- a/test-submodule-config.c
+++ b/test-submodule-config.c
@@ -23,7 +23,7 @@ int main(int argc, char **argv)
 
 	arg++;
 	my_argc--;
-	while (starts_with(arg[0], "--")) {
+	while (arg[0] && starts_with(arg[0], "--")) {
 		if (!strcmp(arg[0], "--url"))
 			output_url = 1;
 		if (!strcmp(arg[0], "--name"))
-- 
2.0.2.832.g083c931