fix dumb crash in minimap -- actors outside the map accessed memory that wasnt part of the bitmap.

This commit is contained in:
Chris Forbes
2010-07-26 22:16:23 +12:00
parent 56e929014d
commit 4cc021adfe

View File

@@ -124,6 +124,7 @@ namespace OpenRA.Graphics
{
var color = t.Trait.RadarSignatureColor(t.Actor);
foreach (var cell in t.Trait.RadarSignatureCells(t.Actor))
if (world.Map.IsInMap(cell))
*(c + ((cell.Y - world.Map.TopLeft.Y) * bitmapData.Stride >> 2) + cell.X - world.Map.TopLeft.X) = color.ToArgb();
}
}