mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- made gender string to integer conversion case insensitive
https://forum.zdoom.org/viewtopic.php?t=64109
This commit is contained in:
parent
f48e0280d8
commit
71caf27039
1 changed files with 13 additions and 4 deletions
|
@ -137,14 +137,23 @@ FString D_UnescapeUserInfo (const char *str, size_t len)
|
|||
|
||||
int D_GenderToInt (const char *gender)
|
||||
{
|
||||
if (gender[0] == 'f')
|
||||
switch (gender[0])
|
||||
{
|
||||
case 'F':
|
||||
case 'f':
|
||||
return GENDER_FEMALE;
|
||||
else if (gender[0] == 'n')
|
||||
|
||||
case 'N':
|
||||
case 'n':
|
||||
return GENDER_NEUTER;
|
||||
else if (gender[0] == 'o')
|
||||
|
||||
case 'O':
|
||||
case 'o':
|
||||
return GENDER_OBJECT;
|
||||
else
|
||||
|
||||
default:
|
||||
return GENDER_MALE;
|
||||
}
|
||||
}
|
||||
|
||||
int D_PlayerClassToInt (const char *classname)
|
||||
|
|
Loading…
Reference in a new issue