From 07a6e40b18f615db30bcc626322313afcf7816a8 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Fri, 1 Apr 2022 10:24:31 -0700 Subject: [PATCH] remove some now-unneeded memcpys --- src/ReceiveCommands.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index c71d24f5..d633a9b7 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -785,7 +785,7 @@ void process_menu_selection(shared_ptr s, shared_ptr c, } } - if (!game->password.empty() && (game->password != password)) { + if (!game->password.empty() && (password != game->password)) { send_message_box(c, u"$C6Incorrect password."); break; } @@ -1338,9 +1338,9 @@ void process_return_player_data_bb(shared_ptr, shared_ptr c const auto& cmd = check_size_t(data); // We only trust the player's quest data and challenge data. - memcpy(&c->player.challenge_data, &cmd.challenge_data, sizeof(cmd.challenge_data)); - memcpy(&c->player.quest_data1, &cmd.quest_data1, sizeof(cmd.quest_data1)); - memcpy(&c->player.quest_data2, &cmd.quest_data2, sizeof(cmd.quest_data2)); + c->player.challenge_data = cmd.challenge_data; + c->player.quest_data1 = cmd.quest_data1; + c->player.quest_data2 = cmd.quest_data2; } ////////////////////////////////////////////////////////////////////////////////