From 63ca15cdb79e8bc60bcfe874f27f871db7ab306b Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 2 Dec 2017 08:28:20 -0800 Subject: [PATCH] Fix non-expanding first entry randomization closes #243 --- pk3DS.Core/Randomizers/LearnsetRandomizer.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pk3DS.Core/Randomizers/LearnsetRandomizer.cs b/pk3DS.Core/Randomizers/LearnsetRandomizer.cs index 7e59ae1..eda660c 100644 --- a/pk3DS.Core/Randomizers/LearnsetRandomizer.cs +++ b/pk3DS.Core/Randomizers/LearnsetRandomizer.cs @@ -57,6 +57,8 @@ private void Randomize(Learnset set, int index) private int[] GetRandomLevels(Learnset set, int count) { int[] levels = new int[count]; + if (count == 0) + return levels; if (Spread) { levels[0] = 1;