1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-29 01:56:44 +02:00

added cmuch smaller client-specific maximum name length

This commit is contained in:
Jfreegman
2013-09-13 00:35:48 -04:00
parent d4f365e28f
commit 863121273e
4 changed files with 27 additions and 10 deletions

View File

@ -81,6 +81,11 @@ void on_action(Tox *m, int friendnumber, uint8_t *string, uint16_t length, void
void on_nickchange(Tox *m, int friendnumber, uint8_t *string, uint16_t length, void *userdata)
{
if (length >= TOXIC_MAX_NAME_LENGTH) { /* length includes null byte */
string[TOXIC_MAX_NAME_LENGTH] = L'\0';
length = TOXIC_MAX_NAME_LENGTH+1;
}
int i;
for (i = 0; i < MAX_WINDOWS_NUM; ++i) {