diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 6bf6d87777..23010d8d50 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -2121,7 +2121,7 @@ namespace RCT1 auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark(); park.ResetHistories(); - std::memcpy(gParkRatingHistory, _s4.park_rating_history, sizeof(_s4.park_rating_history)); + std::copy(std::begin(_s4.park_rating_history), std::end(_s4.park_rating_history), gParkRatingHistory); for (size_t i = 0; i < std::size(_s4.guests_in_park_history); i++) { if (_s4.guests_in_park_history[i] != RCT12ParkHistoryUndefined) diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 95d7fdcc09..6f3e4b0168 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -351,7 +351,7 @@ void S6Exporter::Export() _s6.park_rating = gParkRating; - std::memcpy(_s6.park_rating_history, gParkRatingHistory, sizeof(_s6.park_rating_history)); + std::copy(std::begin(gParkRatingHistory), std::end(gParkRatingHistory), _s6.park_rating_history); std::fill(std::begin(_s6.guests_in_park_history), std::end(_s6.guests_in_park_history), RCT12ParkHistoryUndefined); for (size_t i = 0; i < std::size(gGuestsInParkHistory); i++) { diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 4b7652d2b6..708d6e404e 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -272,7 +272,7 @@ public: auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark(); park.ResetHistories(); - std::memcpy(gParkRatingHistory, _s6.park_rating_history, sizeof(_s6.park_rating_history)); + std::copy(std::begin(_s6.park_rating_history), std::end(_s6.park_rating_history), gParkRatingHistory); for (size_t i = 0; i < std::size(_s6.guests_in_park_history); i++) { if (_s6.guests_in_park_history[i] != RCT12ParkHistoryUndefined)