Bounds check species name on report summary

This commit is contained in:
Kurt 2020-10-24 20:22:08 -07:00
parent 6079f53d9a
commit babf5a48ca

View file

@ -91,7 +91,9 @@ namespace PKHeX.Core
get
{
var enc = EncounterOriginal;
return $"{enc.LongName} ({SpeciesStrings[enc.Species]})";
var str = SpeciesStrings;
var name = (uint) enc.Species < str.Count ? str[enc.Species] : enc.Species.ToString();
return $"{enc.LongName} ({name})";
}
}