From c7e570b92d489eec5d2885999fbb0ef248da1a50 Mon Sep 17 00:00:00 2001 From: ReignOfComputer Date: Sun, 5 Feb 2017 23:23:17 +0800 Subject: [PATCH] Add Check for Bad Ability Length 2 Forgot to save, again. --- PKHeX.WinForms/MainWindow/MainPK7.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/PKHeX.WinForms/MainWindow/MainPK7.cs b/PKHeX.WinForms/MainWindow/MainPK7.cs index 56b4c727e..df8660054 100644 --- a/PKHeX.WinForms/MainWindow/MainPK7.cs +++ b/PKHeX.WinForms/MainWindow/MainPK7.cs @@ -185,6 +185,7 @@ namespace PKHeX.WinForms pk7.SID = Util.ToInt32(TB_SID.Text); pk7.EXP = Util.ToUInt32(TB_EXP.Text); + if (CB_Ability.Text.Length >= 4) { pk7.Ability = (byte)Array.IndexOf(GameInfo.Strings.abilitylist, CB_Ability.Text.Remove(CB_Ability.Text.Length - 4)); pk7.AbilityNumber = Util.ToInt32(TB_AbilityNumber.Text); // Number