Bounds check species ID for negative

certain downstream consumers of the library be doin silly things
This commit is contained in:
Kurt 2018-07-12 17:09:39 -07:00
parent 04765ef411
commit 3da4873f94

View file

@ -150,7 +150,7 @@ namespace PKHeX.Core
public string Text => GetText(); public string Text => GetText();
private string GetText() private string GetText()
{ {
if (Species == 0 || Species > MAX_SPECIES) if (Species <= 0 || Species > MAX_SPECIES)
return string.Empty; return string.Empty;
var result = new List<string>(); var result = new List<string>();