diff options
Diffstat (limited to '')
-rw-r--r-- | chat.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chat.h b/chat.h index b06d383..8de5d55 100644 --- a/chat.h +++ b/chat.h @@ -137,6 +137,7 @@ static inline uint idFor(const char *name) { } extern uint32_t hashInit; +extern uint32_t hashBound; static inline enum Color hash(const char *str) { if (*str == '~') str++; uint32_t hash = hashInit; @@ -145,7 +146,7 @@ static inline enum Color hash(const char *str) { hash ^= *str; hash *= 0x27220A95; } - return Blue + hash % 74; + return Blue + hash % (hashBound + 1 - Blue); } extern struct Network { |