diff --git a/src/openrct2/scenario/ScenarioRepository.cpp b/src/openrct2/scenario/ScenarioRepository.cpp index 14dadb9301..21f3432dc9 100644 --- a/src/openrct2/scenario/ScenarioRepository.cpp +++ b/src/openrct2/scenario/ScenarioRepository.cpp @@ -210,6 +210,7 @@ private: { auto data = DecryptSea(fs::u8path(path)); auto ms = std::make_unique(); + // Need to copy the data into MemoryStream as the overload will borrow instead of copy. ms->Write(data.data(), data.size()); ms->SetPosition(0); return ms;