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

small fix

This commit is contained in:
Jfreegman 2014-03-30 01:22:40 -04:00
parent 52d6e8431f
commit 1420618eb0
2 changed files with 2 additions and 1 deletions

View File

@ -334,7 +334,7 @@ void cmd_nick(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MA
return;
}
if (len > TOXIC_MAX_NAME_LENGTH) {
if (len >= TOXIC_MAX_NAME_LENGTH) {
len = TOXIC_MAX_NAME_LENGTH;
nick[len-1] = L'\0';
}

View File

@ -149,6 +149,7 @@ void line_info_add(ToxWindow *self, uint8_t *tmstmp, uint8_t *name1, uint8_t *na
if (hst->line_start->prev == NULL) { /* if line_start is root move it forward as well */
hst->line_start = hst->line_start->next;
hst->line_start->prev = NULL;
++hst->start_id;
}
free(hst->line_root);