mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-27 19:23:33 -05:00
Bounds check species name on report summary
This commit is contained in:
parent
6079f53d9a
commit
babf5a48ca
|
|
@ -91,7 +91,9 @@ private string EncounterName
|
|||
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 New Issue
Block a user