Fixing a bug with the Country Sub Region selection

This bug occurred via switching from "Australia" to "Austria" while selecting "Vorarlberg".
It throws an ArgumentException and this is the fix I used while working on this: http://projectpokemon.org/forums/showthread.php?44994-Mass-Editor-for-all-PKHeX-supported-files
This commit is contained in:
FullLifeGames
2015-03-03 18:11:21 +01:00
parent a103e2fede
commit aa309ae034

View File

@@ -1221,7 +1221,7 @@ public void setCountrySubRegion(object sender, string type)
CB.DataSource = Util.getCBList(type, cl);
if (index > 0 && index <= CB.Items.Count && init)
if (index > 0 && index < CB.Items.Count && init)
CB.SelectedIndex = index;
}
public void setForms(int species, ComboBox cb)
@@ -4692,4 +4692,4 @@ private void pbBoxSlot_DragEnter(object sender, DragEventArgs e)
private int pkm_from_slot = -1;
#endregion
}
}
}