diff options
author | C. McEnroe | 2020-02-08 01:14:41 -0500 |
---|---|---|
committer | C. McEnroe | 2020-02-08 01:14:41 -0500 |
commit | fda510b8761f487c36988eb70a6d95bd0d583aed (patch) | |
tree | fa9ee4f4ef8ce2c3d8daca8e0b66bff9a25bb6b3 /chat.h | |
parent | b5707af4b842f521104c5fba07e5685612ff91f2 (diff) |
Handle ID overflow
idk just shove it all in <network>.
Diffstat (limited to 'chat.h')
-rw-r--r-- | chat.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/chat.h b/chat.h index bd36d27..081370e 100644 --- a/chat.h +++ b/chat.h @@ -49,6 +49,7 @@ static inline size_t idFind(const char *name) { static inline size_t idFor(const char *name) { size_t id = idFind(name); if (id) return id; + if (idNext == IDCap) return Network; idNames[idNext] = strdup(name); if (!idNames[idNext]) err(EX_OSERR, "strdup"); idColors[idNext] = Default; |