Fix imported scores not getting LegacyTotalScore

This commit is contained in:
Dan Balasescu 2023-06-28 14:50:16 +09:00
parent 6e2369e651
commit e291dff5ad
1 changed files with 3 additions and 0 deletions

View File

@ -123,6 +123,9 @@ public Score Parse(Stream stream)
PopulateAccuracy(score.ScoreInfo);
if (score.ScoreInfo.IsLegacyScore)
score.ScoreInfo.LegacyTotalScore = score.ScoreInfo.TotalScore;
// before returning for database import, we must restore the database-sourced BeatmapInfo.
// if not, the clone operation in GetPlayableBeatmap will cause a dereference and subsequent database exception.
score.ScoreInfo.BeatmapInfo = workingBeatmap.BeatmapInfo;