mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-28 06:46:05 -05:00
Bounds check species name on report summary
This commit is contained in:
@@ -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})";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user