Merge pull request #12116 from obrakmann/fix11925_log-unknown-orders

Log unknown orders instead of crashing with an NIE
This commit is contained in:
abcdefg30
2016-09-30 16:11:55 +02:00
committed by GitHub

View File

@@ -64,7 +64,8 @@ namespace OpenRA
public static Order Deserialize(World world, BinaryReader r)
{
switch (r.ReadByte())
var magic = r.ReadByte();
switch (magic)
{
case 0xFF:
{
@@ -98,7 +99,10 @@ namespace OpenRA
}
default:
throw new NotImplementedException();
{
Log.Write("debug", "Received unknown order with magic {0}", magic);
return null;
}
}
}