diff --git a/CHANGELOG.md b/CHANGELOG.md index 00b5917..58c2f71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# Concealment 1.2.1 +* Fixes + - Fixed off-by-one crash in RevealGrids() + # Concealment 1.2 * Features - Added option to exempt pirate-owned grids diff --git a/Concealment/ConcealmentPlugin.cs b/Concealment/ConcealmentPlugin.cs index 9039223..257086a 100644 --- a/Concealment/ConcealmentPlugin.cs +++ b/Concealment/ConcealmentPlugin.cs @@ -31,7 +31,7 @@ namespace Concealment { - [Plugin("Concealment", "1.2", "17f44521-b77a-4e85-810f-ee73311cf75d")] + [Plugin("Concealment", "1.2.1", "17f44521-b77a-4e85-810f-ee73311cf75d")] public sealed class ConcealmentPlugin : TorchPluginBase, IWpfPlugin { public Persistent Settings { get; private set; } @@ -311,7 +311,7 @@ public int RevealGrids(double distanceFromPlayers) if (_settingsChanged) { - for (var i = ConcealedGroups.Count; i >= 0; i--) + for (var i = ConcealedGroups.Count - 1; i >= 0; i--) { if (IsExcluded(ConcealedGroups[i])) revealed += RevealGroup(ConcealedGroups[i]);