diff options
Diffstat (limited to '')
-rw-r--r-- | color.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/color.c b/color.c index f713451..dad5647 100644 --- a/color.c +++ b/color.c @@ -29,8 +29,9 @@ static uint32_t hashChar(uint32_t hash, char ch) { enum IRCColor colorGen(const char *str) { if (!str) return IRCDefault; uint32_t hash = 0; - for (; str[0]; ++str) { - hash = hashChar(hash, str[0]); + if (*str == '~') str++; + for (; *str; ++str) { + hash = hashChar(hash, *str); } while (IRCBlack == (hash & IRCLightGray)) { hash = hashChar(hash, '\0'); |