1
0
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:
Jfreegman
2014-10-06 16:23:43 -04:00
parent 43552161f9
commit 6492bd12f9
4 changed files with 19 additions and 3 deletions

View File

@ -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;