Safe accessing

2 gender chars at most -> any fuzz/bad pk6 won't throw here.
This commit is contained in:
Kaphotics 2016-03-13 23:20:45 -07:00
parent 1ed58fd8d3
commit c08e8a75c5

View file

@ -1114,7 +1114,7 @@ namespace PKHeX
CB_MetLocation.SelectedValue = pk6.Met_Location; CB_MetLocation.SelectedValue = pk6.Met_Location;
// Set CT Gender to None if no CT, else set to gender symbol. // Set CT Gender to None if no CT, else set to gender symbol.
Label_CTGender.Text = pk6.HT_Name == "" ? "" : gendersymbols[pk6.HT_Gender]; Label_CTGender.Text = pk6.HT_Name == "" ? "" : gendersymbols[pk6.HT_Gender % 2];
Label_CTGender.ForeColor = pk6.HT_Gender == 1 ? Color.Red : Color.Blue; Label_CTGender.ForeColor = pk6.HT_Gender == 1 ? Color.Red : Color.Blue;
TB_MetLevel.Text = pk6.Met_Level.ToString(); TB_MetLevel.Text = pk6.Met_Level.ToString();