Ignore malformed LAN advertisements instead of crashing.

This matches the behaviour for online game handling.
This commit is contained in:
Paul Chote
2017-12-25 13:22:29 +00:00
committed by reaperrr
parent ec97214c16
commit a3882501b1

View File

@@ -317,8 +317,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (addressNode != null)
addressNode.Value.Value = bl.Address.ToString().Split(':')[0] + ":" + addressNode.Value.Value.Split(':')[1];
try
{
lanGames.Add(new GameServer(game));
}
catch { }
}
}
var groupedLanGames = lanGames.GroupBy(gs => gs.Address).Select(g => g.Last());