X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=config.c;h=e87edeab0c6b9579ecbd9bc5a9a11c3522d21ccf;hb=da8ba5e7da01be597aa9417c563dbd516ea5f204;hp=738b24419dcd0deb4bb0700f25f8984b8862d14f;hpb=d1926f63ec93e84dba1a54c5de898fb517d9ca59;p=git.git diff --git a/config.c b/config.c index 738b24419..e87edeab0 100644 --- a/config.c +++ b/config.c @@ -62,7 +62,8 @@ static char *parse_value(void) if (comment) continue; if (isspace(c) && !quote) { - space = 1; + if (len) + space++; continue; } if (!quote) { @@ -71,11 +72,8 @@ static char *parse_value(void) continue; } } - if (space) { - if (len) - value[len++] = ' '; - space = 0; - } + for (; space; space--) + value[len++] = ' '; if (c == '\\') { c = get_next_char(); switch (c) {