mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-02 05:46:47 -05:00
Fix species off by one
len(0+maxspecies) == maxspecies+1 now matches other usages
This commit is contained in:
@@ -17,7 +17,7 @@ public EvolutionEditor6(byte[][] infiles)
|
||||
InitializeComponent();
|
||||
|
||||
specieslist[0] = movelist[0] = itemlist[0] = "";
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID);
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID + 1);
|
||||
|
||||
string[] evolutionMethods =
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ public partial class GiftEditor6 : Form
|
||||
public GiftEditor6()
|
||||
{
|
||||
specieslist[0] = "---";
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID);
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID + 1);
|
||||
if (!File.Exists(FieldPath))
|
||||
{
|
||||
Util.Error("CRO does not exist! Closing.", FieldPath);
|
||||
|
||||
@@ -14,7 +14,7 @@ public MaisonEditor6(byte[][] trd, byte[][] trp, bool super)
|
||||
{
|
||||
trFiles = trd;
|
||||
pkFiles = trp;
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID);
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID + 1);
|
||||
movelist[0] = specieslist[0] = itemlist[0] = "";
|
||||
|
||||
trNames = Main.getText(super ? TextName.SuperTrainerNames : TextName.MaisonTrainerNames); Array.Resize(ref trNames, trFiles.Length);
|
||||
|
||||
@@ -16,7 +16,7 @@ public RSTE(byte[][] trc, byte[][] trd, byte[][] trp)
|
||||
trclass = trc;
|
||||
trdata = trd;
|
||||
trpoke = trp;
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID);
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID + 1);
|
||||
|
||||
InitializeComponent();
|
||||
// String Fetching
|
||||
|
||||
@@ -9,7 +9,7 @@ public partial class StarterEditor6 : Form
|
||||
public StarterEditor6()
|
||||
{
|
||||
specieslist[0] = "---";
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID);
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID + 1);
|
||||
|
||||
if (!File.Exists(CROPath))
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ public partial class StaticEncounterEditor6 : Form
|
||||
public StaticEncounterEditor6()
|
||||
{
|
||||
specieslist[0] = "---";
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID);
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID + 1);
|
||||
if (!File.Exists(FieldPath))
|
||||
{
|
||||
Util.Error("CRO does not exist! Closing.", FieldPath);
|
||||
|
||||
@@ -14,7 +14,7 @@ public MaisonEditor7(byte[][] trd, byte[][] trp, bool royal)
|
||||
{
|
||||
trFiles = trd;
|
||||
pkFiles = trp;
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID);
|
||||
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID + 1);
|
||||
movelist[0] = specieslist[0] = itemlist[0] = "";
|
||||
|
||||
trNames = Main.getText(royal ? TextName.BattleRoyalNames : TextName.BattleTreeNames); Array.Resize(ref trNames, trFiles.Length);
|
||||
|
||||
Reference in New Issue
Block a user