Commit 0130d8184e7a0087a5b95700e9a19d60f35b869f

Carlos Martín Nieto 2011-04-27T11:20:38

Fix git__strntolower Obviously, the whole string should be lower-cased and not just the last char. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/config.c b/src/config.c
index 3bde15b..1ac6ed8 100644
--- a/src/config.c
+++ b/src/config.c
@@ -165,7 +165,7 @@ void git__strntolower(char *str, int len)
 	int i;
 
 	for (i = 0; i < len; ++i) {
-		str[len] = tolower(str[len]);
+		str[i] = tolower(str[i]);
 	}
 }