mirror of
https://github.com/ppy/osu
synced 2025-01-11 00:29:30 +00:00
Fix incorrect indexing
This commit is contained in:
parent
6775151c30
commit
76eff7f6b1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user