mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-03 03:26:45 +02:00
null terminate status message
This commit is contained in:
@ -298,7 +298,9 @@ static void prompt_onDraw(ToxWindow *self, Tox *m)
|
||||
char statusmsg[TOX_MAX_STATUS_MESSAGE_LENGTH];
|
||||
|
||||
pthread_mutex_lock(&Winthread.lock);
|
||||
tox_self_get_status_message(m, (uint8_t *) statusmsg);
|
||||
size_t slen = tox_self_get_status_message_size(m);
|
||||
tox_self_get_status_message (m, (uint8_t*) statusmsg);
|
||||
statusmsg[slen] = '\0';
|
||||
pthread_mutex_unlock(&Winthread.lock);
|
||||
|
||||
snprintf(statusbar->statusmsg, sizeof(statusbar->statusmsg), "%s", statusmsg);
|
||||
|
Reference in New Issue
Block a user