From 9c8031d8477783ba8c54281b3659993159efe250 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 29 Jan 2017 00:32:02 -0800 Subject: [PATCH] Add bad showdown set handling dat fuzz --- PKHeX/PKM/ShowdownSet.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PKHeX/PKM/ShowdownSet.cs b/PKHeX/PKM/ShowdownSet.cs index 128649f72..c20573418 100644 --- a/PKHeX/PKM/ShowdownSet.cs +++ b/PKHeX/PKM/ShowdownSet.cs @@ -84,6 +84,8 @@ namespace PKHeX.Core } string[] brokenline = line.Split(new[] { ": " }, StringSplitOptions.None); + if (brokenline.Length == 1) + brokenline = new[] {brokenline[0], ""}; switch (brokenline[0]) { case "Trait": @@ -342,6 +344,8 @@ namespace PKHeX.Core private void parseLineEVs(string line) { string[] evlist = splitLineStats(line); + if (evlist.Length == 1) + InvalidLines.Add("Unknown EV input."); for (int i = 0; i < evlist.Length / 2; i++) { ushort EV; @@ -356,6 +360,8 @@ namespace PKHeX.Core private void parseLineIVs(string line) { string[] ivlist = splitLineStats(line); + if (ivlist.Length == 1) + InvalidLines.Add("Unknown IV input."); for (int i = 0; i < ivlist.Length / 2; i++) { byte IV;