diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-06-11 12:48:00 +0400 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-06-11 13:01:45 +0400 |
commit | 24ec69998db55478af24b471b9000bd56113abd6 (patch) | |
tree | 87e2d460bbd239b5861a1c4762301b15c960c719 /src/signature.c | |
parent | 3de768ca2f148777f099c67114d0419a90b6eea1 (diff) |
signature: extend trimming to more whitespace
There are all sorts of misconfiguration in the wild. We already rely
on the signature constructor to trim SP. Extend the logic to use
`isspace` to decide whether a character should be trimmed.
Diffstat (limited to 'src/signature.c')
-rw-r--r-- | src/signature.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/signature.c b/src/signature.c index cd6167fb4..e338f0802 100644 --- a/src/signature.c +++ b/src/signature.c @@ -35,11 +35,11 @@ static bool contains_angle_brackets(const char *input) static char *extract_trimmed(const char *ptr, size_t len) { - while (len && ptr[0] == ' ') { + while (len && git__isspace(ptr[0])) { ptr++; len--; } - while (len && ptr[len - 1] == ' ') { + while (len && git__isspace(ptr[len - 1])) { len--; } |