Browse Source

15 GiB allocate memory fix (0_0)

Tigran 4 năm trước cách đây
mục cha
commit
168f3c508b

+ 1 - 1
MafiaTelegramBot/Game/GameRooms/GameRoom.MessageHandler.cs

@@ -58,7 +58,7 @@ namespace MafiaTelegramBot.Game.GameRooms
                 var knownRoles = player.CurrentRole.KnownRoles;
                 var message = strings.players_list;
                 var stopIndex = -1;
-                for (var i = 0; i <= players.Length && i != stopIndex; ++i)
+                for (var i = 0; i != stopIndex; i = (i+1) % players.Length)
                 {
                     i %= players.Length;
                     if (stopIndex == -1 && players[i].Id == nextPlayer.Id) stopIndex = i;