diff options
author | Timo Hirvonen <tihirvon@gmail.com> | 2008-02-06 14:16:08 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-06 14:02:41 -0800 |
commit | a0cf49c16ae37177dcfcefa1149bf09f84721cf5 (patch) | |
tree | cac86ec1c7498c185638dbe979406ff05bce32cf /color.c | |
parent | f1c3239ab5c4d66637822b03db407f87ed068d15 (diff) | |
download | git-a0cf49c16ae37177dcfcefa1149bf09f84721cf5.tar.gz |
Fix parsing numeric color values
Numeric color only worked if it was at end of line.
Noticed by Chris Larson <clarson@kergoth.com>.
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'color.c')
-rw-r--r-- | color.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 (end - name == len && i >= -1 && i <= 255) return i; return -2; } |