From 76eff7f6b1fcbf742b69505027892c0862821e02 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Fri, 22 Oct 2021 21:57:29 +0900 Subject: [PATCH] Fix incorrect indexing --- osu.Game/Online/Multiplayer/MultiplayerClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Online/Multiplayer/MultiplayerClient.cs b/osu.Game/Online/Multiplayer/MultiplayerClient.cs index 10dd0e9b0e..6b1042df2d 100644 --- a/osu.Game/Online/Multiplayer/MultiplayerClient.cs +++ b/osu.Game/Online/Multiplayer/MultiplayerClient.cs @@ -622,7 +622,7 @@ namespace osu.Game.Online.Multiplayer Debug.Assert(APIRoom != null); - int index = APIRoom.Playlist.Where(p => p.ID == item.ID).Select((_, i) => i).Single(); + int index = APIRoom.Playlist.Select((i, index) => (i, index)).Single(kvp => kvp.i.ID == item.ID).index; APIRoom.Playlist.RemoveAt(index); APIRoom.Playlist.Insert(index, playlistItem); }).ConfigureAwait(false);