From 073682e29672610f840cb67cf1b8b5e8decbf36c Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Tue, 28 Oct 2025 21:46:38 -0400 Subject: Allow colour hashing to pick white This changes all the colours sadly. Oh well. One must deal with change in life. --- chat.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'chat.h') 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 { -- cgit 1.4.1