Skip to content

Commit

Permalink
Update Settings.cs
Browse files Browse the repository at this point in the history
Since the collection is zero-based, it should be - 1 rather than + 1.
  • Loading branch information
ianpugh committed Aug 8, 2016
1 parent a27f738 commit 11eab05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PoGo.NecroBot.Logic/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void Load(string path)
{
// Random is set, so pick a random device package and set it up - it will get saved to disk below and re-used in subsequent sessions
Random rnd = new Random();
int rndIdx = rnd.Next(0, DeviceInfoHelper.DeviceInfoSets.Keys.Count + 1);
int rndIdx = rnd.Next(0, DeviceInfoHelper.DeviceInfoSets.Keys.Count - 1);
this.DevicePackageName = DeviceInfoHelper.DeviceInfoSets.Keys.ToArray()[rndIdx];
SetDevInfoByKey(this.DevicePackageName);
}
Expand Down

0 comments on commit 11eab05

Please sign in to comment.