X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=color.c;h=cb70340420b6285786b988d4a98d2023a37d4ffc;hb=b828fef678c21d017f18d2094bfdaac94e5fbf7a;hp=7f66c29fae57abceda30b1257c2a66626f3be0b2;hpb=467f42cfa1d298dcaab40e06f8dfa8f80ee345f7;p=git.git diff --git a/color.c b/color.c index 7f66c29fa..cb7034042 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 (end - name == len && i >= -1 && i <= 255) return i; return -2; }