Fix sprintf in set_name

This commit is contained in:
flyingscorpio@clevo 2022-11-04 14:58:13 +01:00
parent 5c44b8d26b
commit 99da0b5e74

View file

@ -268,7 +268,7 @@ int cmd_set_name(int sender_id, char* name){
return -1; 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); sprintf(buf, "Name changed for %s\n", name);
cmd_send_message(SERVER_ID, sender_id, buf); cmd_send_message(SERVER_ID, sender_id, buf);