mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-24 04:53:08 +00:00
Safety check
negative species/formestatsindex returns species
This commit is contained in:
parent
52c87c8c5f
commit
f0503540a0
1 changed files with 2 additions and 2 deletions
|
@ -80,9 +80,9 @@ namespace PKHeX
|
|||
// Data Manipulation
|
||||
public int FormeIndex(int species, int forme)
|
||||
{
|
||||
if (forme == 0) // no forme requested
|
||||
if (forme <= 0) // no forme requested
|
||||
return species;
|
||||
if (FormStatsIndex == 0) // no formes present
|
||||
if (FormStatsIndex <= 0) // no formes present
|
||||
return species;
|
||||
if (forme > FormeCount) // beyond range of species' formes
|
||||
return species;
|
||||
|
|
Loading…
Reference in a new issue