diff --git a/src/prompt.c b/src/prompt.c index f5d4706..943cbf7 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -369,7 +369,7 @@ static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int32_t friendnum ChatContext *ctx = self->chatwin; - uint8_t nick[TOX_MAX_NAME_LENGTH]; + uint8_t nick[TOX_MAX_NAME_LENGTH] = {0}; int n_len = tox_get_name(m, friendnum, nick); n_len = MIN(n_len, TOXIC_MAX_NAME_LENGTH-1);