Fix max view distance check.

This commit is contained in:
Mazar Farran
2016-02-12 21:01:34 -08:00
parent 613854de91
commit 22a3358581

View File

@@ -1151,7 +1151,7 @@ namespace OpenRA
if (maxRange < minRange)
throw new ArgumentOutOfRangeException("maxRange", "Maximum range is less than the minimum range.");
if (maxRange > TilesByDistance.Length)
if (maxRange >= TilesByDistance.Length)
throw new ArgumentOutOfRangeException("maxRange", "The requested range ({0}) exceeds the maximum allowed ({1})".F(maxRange, MaxTilesInCircleRange));
Func<CPos, bool> valid = Contains;