diff --git a/src/d_player.h b/src/d_player.h index 4eae01926..d52e35979 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -250,8 +250,8 @@ struct userinfo_t : TMap } int GetGender() const { - auto cvar = static_cast(*CheckKey(NAME_Gender)); - return cvar? *cvar : 0; + auto cvar = CheckKey(NAME_Gender); + return cvar ? *static_cast(*cvar) : 0; } bool GetNoAutostartMap() const {