mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-27 16:26:46 +02:00
escape newlines in contact names/status messages
This commit is contained in:
@ -112,6 +112,7 @@ void on_nickchange(Tox *m, int32_t friendnumber, const uint8_t *string, uint16_t
|
||||
{
|
||||
char nick[TOXIC_MAX_NAME_LENGTH + 1];
|
||||
length = copy_tox_str(nick, sizeof(nick), (const char *) string, length);
|
||||
escape_newline_str(nick, length);
|
||||
|
||||
int i;
|
||||
|
||||
@ -127,6 +128,7 @@ void on_statusmessagechange(Tox *m, int32_t friendnumber, const uint8_t *string,
|
||||
{
|
||||
char msg[TOX_MAX_STATUSMESSAGE_LENGTH + 1];
|
||||
length = copy_tox_str(msg, sizeof(msg), (const char *) string, length);
|
||||
escape_newline_str(msg, length);
|
||||
|
||||
int i;
|
||||
|
||||
|
Reference in New Issue
Block a user