diff --git a/src/server.c b/src/server.c index 3bdb675..3ef998d 100644 --- a/src/server.c +++ b/src/server.c @@ -268,7 +268,7 @@ int cmd_set_name(int sender_id, char* name){ return -1; } - sprintf(clients[sender_id].name, name, MAX_NAME_LENGTH); + sprintf(clients[sender_id].name, "%s", name); sprintf(buf, "Name changed for %s\n", name); cmd_send_message(SERVER_ID, sender_id, buf);