mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-26 09:04:09 -05:00
Add guard check for out of range gen1 species
Thanks ShadowMario3!
This commit is contained in:
@@ -21,7 +21,7 @@ internal static class SpeciesConverter
|
||||
/// </summary>
|
||||
/// <param name="dex_id">National Dex ID.</param>
|
||||
/// <returns>Generation 1 species ID.</returns>
|
||||
public static int SetG1Species(int dex_id) => table1_Internal[dex_id];
|
||||
public static int SetG1Species(int dex_id) => dex_id >= table1_Internal.Length ? 0 : table1_Internal[dex_id];
|
||||
|
||||
/// <summary>
|
||||
/// Converts a National Dex ID to Generation 3 species ID.
|
||||
|
||||
Reference in New Issue
Block a user