mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-01 14:07:57 -05:00
Safety check
negative species/formestatsindex returns species
This commit is contained in:
@@ -80,9 +80,9 @@ protected static byte[] setBits(bool[] bits)
|
||||
// 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;
|
||||
|
||||
Reference in New Issue
Block a user