1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-03 12:16:44 +02:00

filter escape sequences from all inbound nicks and status messages

This commit is contained in:
Jfreegman
2014-10-07 16:18:06 -04:00
parent 1f2bd44dce
commit 9f0daca5eb
6 changed files with 17 additions and 9 deletions

View File

@ -935,9 +935,11 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
char statusmsg[TOX_MAX_STATUSMESSAGE_LENGTH];
pthread_mutex_lock(&Winthread.lock);
tox_get_status_message(m, Friends.list[f].num, (uint8_t *) statusmsg, TOX_MAX_STATUSMESSAGE_LENGTH);
int s_len = tox_get_status_message(m, Friends.list[f].num, (uint8_t *) statusmsg,
TOX_MAX_STATUSMESSAGE_LENGTH);
pthread_mutex_unlock(&Winthread.lock);
filter_str(statusmsg, s_len);
snprintf(Friends.list[f].statusmsg, sizeof(Friends.list[f].statusmsg), "%s", statusmsg);
Friends.list[f].statusmsg_len = strlen(Friends.list[f].statusmsg);
}