mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Bounds check species name on report summary
This commit is contained in:
parent
6079f53d9a
commit
babf5a48ca
1 changed files with 3 additions and 1 deletions
|
@ -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})";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue