mirror of
https://github.com/Tha14/toxic.git
synced 2024-12-23 07:23:24 +01:00
Make sure message id fits inside a signed int
This commit is contained in:
parent
0136f22076
commit
56a9571509
@ -226,7 +226,7 @@ int line_info_add(ToxWindow *self, const char *timestr, const char *name1, const
|
||||
len += strlen(new_line->name2);
|
||||
}
|
||||
|
||||
new_line->id = hst->line_end->id + 1 + hst->queue_sz;
|
||||
new_line->id = (hst->line_end->id + 1 + hst->queue_sz) % INT_MAX;
|
||||
new_line->len = len;
|
||||
new_line->type = type;
|
||||
new_line->bold = bold;
|
||||
|
Loading…
Reference in New Issue
Block a user