From caba78cb5d0ebd67053537e634d613fae733933c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 19 Jul 2021 13:04:16 +0900 Subject: [PATCH] Copy score during submission process to ensure it isn't modified --- osu.Game/Screens/Play/SoloPlayer.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/SoloPlayer.cs b/osu.Game/Screens/Play/SoloPlayer.cs index d90e8e0168..7d15fcf49f 100644 --- a/osu.Game/Screens/Play/SoloPlayer.cs +++ b/osu.Game/Screens/Play/SoloPlayer.cs @@ -38,13 +38,15 @@ namespace osu.Game.Screens.Play protected override APIRequest CreateSubmissionRequest(Score score, long token) { - var beatmap = score.ScoreInfo.Beatmap; + var scoreCopy = score.DeepClone(); + + var beatmap = scoreCopy.ScoreInfo.Beatmap; Debug.Assert(beatmap.OnlineBeatmapID != null); int beatmapId = beatmap.OnlineBeatmapID.Value; - return new SubmitSoloScoreRequest(beatmapId, token, score.ScoreInfo); + return new SubmitSoloScoreRequest(beatmapId, token, scoreCopy.ScoreInfo); } } }