Commit 631752aaf61f207143dc2058782b0a97effee6e3

Carlos Martín Nieto 2011-04-11T17:49:47

Fix number suffix detection Allow a number not to have a suffix. This broke when adding the suffixes. 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 78a31ae..6b4007d 100644
--- a/src/config.c
+++ b/src/config.c
@@ -394,6 +394,8 @@ int git_config_get_long(git_config *cfg, const char *name, long int *out)
 		return GIT_EINVALIDTYPE;
 
 	switch (*num_end) {
+	case '\0':
+		break;
 	case 'k':
 		num *= 1024;
 		break;