mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 08:47:14 +00:00
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.
This commit is contained in:
parent
bd08d11597
commit
0cfb79a3e2
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue