Merge pull request #12425 from pchote/fix-shroud-crash

Fix missing array bounds check in Shroud.IsExplored.
This commit is contained in:
reaperrr
2016-11-25 12:03:15 +01:00
committed by GitHub

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)