1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 01:53:02 +01:00

Make sure message id fits inside a signed int

This commit is contained in:
jfreegman 2017-06-02 01:15:44 -04:00
parent 0136f22076
commit 56a9571509
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -226,7 +226,7 @@ int line_info_add(ToxWindow *self, const char *timestr, const char *name1, const
len += strlen(new_line->name2); 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->len = len;
new_line->type = type; new_line->type = type;
new_line->bold = bold; new_line->bold = bold;