From e290443d4ea18264b3a2ba4acd8e8d7c33ad51c0 Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Thu, 1 Sep 2016 20:48:38 -0700 Subject: [PATCH] Fix bad input exception handling Matches the other implementation --- PKHeX/PKM/ShowdownSet.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/PKHeX/PKM/ShowdownSet.cs b/PKHeX/PKM/ShowdownSet.cs index 736bb93ec..840ca3112 100644 --- a/PKHeX/PKM/ShowdownSet.cs +++ b/PKHeX/PKM/ShowdownSet.cs @@ -185,6 +185,7 @@ public ShowdownSet(string input = null) ) { string[] tmp = spec.Split(new[] { "-" }, StringSplitOptions.None); + if (tmp.Length < 2) return; Species = Array.IndexOf(species, tmp[0].Replace(" ", "")); Form = tmp[1].Trim(); if (tmp.Length > 2)