From 0cfb79a3e28a6d7f2202505a546225b2e478adf5 Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 15 Nov 2017 18:13:04 -0800 Subject: [PATCH] handle hacked edge case input gen7 pkm version on format5 -> exception on new int[-X] normally caught via exception suppression but better to handle the cause. --- PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs b/PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs index 5c645751e..52e144307 100644 --- a/PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs +++ b/PKHeX.Core/Legality/Encounters/VerifyCurrentMoves.cs @@ -816,6 +816,8 @@ namespace PKHeX.Core } private static int[] GetGenMovesOrder(int start, int end) { + if (start <= end) + return new[] {start}; var order = new int[start - end + 1]; for (int i = 0; i < order.Length; i++) order[i] = start - i;