From: Chris Larson Date: Tue, 05 Feb 2008 17:34:34 GMT Subject: [PATCH] Fix bug in parse_color that prevented the user from changing the background colors. Message-ID: <47A89E2A.9010905@kergoth.com> The comments in color.c indicate that the syntax for the color options in the git config is [fg [bg]] [attr], however the implementation fails if strtol is unable to convert the string in its entirety into an integer. Signed-off-by: Chris Larson --- color.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/color.c b/color.c index 7f66c29..62518fa 100644 --- a/color.c +++ b/color.c @@ -17,7 +17,7 @@ static int parse_color(const char *name, int len) return i - 1; } i = strtol(name, &end, 10); - if (*name && !*end && i >= -1 && i <= 255) + if (*name && i >= -1 && i <= 255) return i; return -2; } -- 1.5.4.29.g43ce-dirty