All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix bug in parse_color that prevented the user from changing the background colors.
@ 2008-02-05 17:34 Chris Larson
  2008-02-05 18:39 ` Timo Hirvonen
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Larson @ 2008-02-05 17:34 UTC (permalink / raw)
  To: git

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 <clarson@kergoth.com>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-02-06 12:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-05 17:34 [PATCH] Fix bug in parse_color that prevented the user from changing the background colors Chris Larson
2008-02-05 18:39 ` Timo Hirvonen
     [not found]   ` <b6ebd0a50802051045t4949df68u7e405ea618403a31@mail.gmail.com>
2008-02-05 18:48     ` Chris Larson
2008-02-05 18:58     ` Timo Hirvonen
2008-02-05 19:18       ` [PATCH] Fix parsing numeric color values Timo Hirvonen
2008-02-06  9:59         ` Junio C Hamano
2008-02-06 12:16           ` [PATCH v2] " Timo Hirvonen
2008-02-06 12:16           ` [PATCH] Add tests for diff/status color parser Timo Hirvonen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.