From 99da0b5e7495d42142b96036e5ec147dc98fe740 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@clevo" Date: Fri, 4 Nov 2022 14:58:13 +0100 Subject: [PATCH] Fix sprintf in set_name --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);