diff --git a/testing/toxic/chat.c b/testing/toxic/chat.c index 32c05dec..35be3bd3 100644 --- a/testing/toxic/chat.c +++ b/testing/toxic/chat.c @@ -181,7 +181,7 @@ static void chat_onKey(ToxWindow *self, Messenger *m, int key) /* make sure the string has at least non-space character */ if (!string_is_empty(ctx->line)) { uint8_t selfname[MAX_NAME_LENGTH]; - getself_name(m, selfname); + getself_name(m, selfname, sizeof(selfname)); fix_name(selfname); wattron(ctx->history, COLOR_PAIR(2)); diff --git a/testing/toxic/main.c b/testing/toxic/main.c index 8ef44012..40ff5d09 100644 --- a/testing/toxic/main.c +++ b/testing/toxic/main.c @@ -140,7 +140,13 @@ static void init_tox() m_callback_namechange(m, on_nickchange, NULL); m_callback_statusmessage(m, on_statuschange, NULL); m_callback_action(m, on_action, NULL); - setname(m, (uint8_t*) "n00b", strlen("n00b")+1); +#ifdef __linux__ + setname(m, (uint8_t*) "Cool guy", sizeof("Cool guy")); +#elif WIN32 + setname(m, (uint8_t*) "I should install GNU/Linux", sizeof("I should install GNU/Linux")); +#else + setname(m, (uint8_t*) "Hipster", sizeof("Hipster")); +#endif } #define MAXLINE 90 /* Approx max number of chars in a sever line (IP + port + key) */