Commit 631752aa by Carlos Martín Nieto

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>
parent 55c197cd
...@@ -394,6 +394,8 @@ int git_config_get_long(git_config *cfg, const char *name, long int *out) ...@@ -394,6 +394,8 @@ int git_config_get_long(git_config *cfg, const char *name, long int *out)
return GIT_EINVALIDTYPE; return GIT_EINVALIDTYPE;
switch (*num_end) { switch (*num_end) {
case '\0':
break;
case 'k': case 'k':
num *= 1024; num *= 1024;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment