diff options
| -rw-r--r-- | chat.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chat.h b/chat.h index 32ba74a..bd69b5e 100644 --- a/chat.h +++ b/chat.h @@ -147,8 +147,9 @@ static inline uint32_t _hash(const char *str) { return hash; } static inline enum Color hash(const char *str) { - if (hashBound < Blue) return Default; - return Blue + _hash(str) % (hashBound + 1 - Blue); + if (!hashBound) return Default; + enum Color color = Black + _hash(str) % (hashBound + 1 - Black); + return (color == Black ? White : color); } extern struct Network { |