Add Check for Bad Ability Length 2

Forgot to save, again.
This commit is contained in:
ReignOfComputer 2017-02-05 23:23:17 +08:00
parent 2de7da80b0
commit c7e570b92d

View file

@ -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