summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinquize <linquize@yahoo.com.hk>2014-10-04 23:27:06 +0800
committerCarlos Martín Nieto <cmn@dwim.me>2014-10-11 12:33:18 +0200
commit68fce7f05deeb0b1da4253800ee51cf6d96fc0f9 (patch)
treea7c3b49eeb586baee2552b339ed60be6873c96db
parenta97157affd08f7a5ae7f1e3372fa61d0829a2cf5 (diff)
downloadlibgit2-68fce7f05deeb0b1da4253800ee51cf6d96fc0f9.tar.gz
config: Fix multiple trailing spaces before comments not completely trimmed
-rw-r--r--src/config_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config_file.c b/src/config_file.c
index 7106f18db..8f55c42f3 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -1163,7 +1163,7 @@ static int strip_comments(char *line, int in_quotes)
}
/* skip any space at the end */
- if (ptr > line && git__isspace(ptr[-1])) {
+ while (ptr > line && git__isspace(ptr[-1])) {
ptr--;
}
ptr[0] = '\0';