Ignore malformed orders instead of crashing.
This commit is contained in:
@@ -75,6 +75,8 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Order Deserialize(World world, BinaryReader r)
|
public static Order Deserialize(World world, BinaryReader r)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var magic = r.ReadByte();
|
var magic = r.ReadByte();
|
||||||
switch (magic)
|
switch (magic)
|
||||||
@@ -171,6 +173,18 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Log.Write("debug", "Caught exception while processing order");
|
||||||
|
Log.Write("debug", e.ToString());
|
||||||
|
|
||||||
|
// HACK: this can hopefully go away in the future
|
||||||
|
Game.Debug("Ignoring malformed order that would have crashed the game");
|
||||||
|
Game.Debug("Please file a bug report and include the replay from this match");
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static uint UIntFromActor(Actor a)
|
static uint UIntFromActor(Actor a)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user