mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Update gender check
showdownset now no longer leaks nulls
This commit is contained in:
parent
6f76a3b1ae
commit
e7486e4534
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ namespace PKHeX.Core
|
|||
/// <param name="gender">Desired <see cref="PKM.Gender"/> value to set.</param>
|
||||
public static void SetGender(this PKM pk, string gender)
|
||||
{
|
||||
int g = gender == null
|
||||
int g = string.IsNullOrEmpty(gender)
|
||||
? pk.GetSaneGender()
|
||||
: PKX.GetGenderFromString(gender);
|
||||
pk.SetGender(g);
|
||||
|
|
Loading…
Reference in a new issue