Compare commits
3 Commits
df24ed474e
...
5ca4578d69
Author | SHA1 | Date |
---|---|---|
Michael Vetter | 5ca4578d69 | |
Michael Vetter | 57c8969de0 | |
toastal | bccfad3de2 |
|
@ -31,4 +31,6 @@
|
|||
* If you could not yet build profanity, mention the revision you try to build from
|
||||
* Operating System/Distribution
|
||||
* glib version
|
||||
* libstrophe version
|
||||
* Some bugs might be due to specific implementation in the server. `/serversoftware example.domain` can be helpful
|
||||
|
||||
|
|
|
@ -361,8 +361,19 @@ find_closest_col(int h, int s, int l)
|
|||
static int
|
||||
find_col(const char* col_name, int n)
|
||||
{
|
||||
char* endptr;
|
||||
unsigned long col_value = strtoul(col_name, &endptr, 0);
|
||||
char name[32] = { 0 };
|
||||
|
||||
/*
|
||||
* When the col_name is a uint8, then we don’t need to look up by
|
||||
* color name (which is problematic given the duplicate names)
|
||||
*/
|
||||
|
||||
if ((*endptr == '\0' || *endptr == '\n') && col_value <= UINT8_MAX) {
|
||||
return (int)col_value;
|
||||
}
|
||||
|
||||
/*
|
||||
* make a null terminated version of col_name. we don't want to
|
||||
* use strNcasecmp because we could end up matching blue3 with
|
||||
|
|
Loading…
Reference in New Issue