Fix missing array bounds check in Shroud.IsExplored.

This commit is contained in:
Paul Chote
2016-11-24 19:07:18 +00:00
parent c244fbb4d3
commit ff94dd914a

View File

@@ -343,7 +343,8 @@ namespace OpenRA.Traits
if (Disabled)
return map.Contains(puv);
return resolvedType[(MPos)puv] > ShroudCellType.Shroud;
var uv = (MPos)puv;
return resolvedType.Contains(uv) && resolvedType[uv] > ShroudCellType.Shroud;
}
public bool IsVisible(WPos pos)