Browse Source

engine: common: simplify string operations

pull/2/head
Alibek Omarov 2 years ago
parent
commit
51161004eb
  1. 3
      engine/common/con_utils.c
  2. 2
      engine/common/cvar.c

3
engine/common/con_utils.c

@ -1324,8 +1324,9 @@ static void Cmd_WriteHelp(const char *name, const char *unused, const char *desc @@ -1324,8 +1324,9 @@ static void Cmd_WriteHelp(const char *name, const char *unused, const char *desc
{
int length;
if( !desc || !Q_strcmp( desc, "" ))
if( !COM_CheckString( desc ))
return; // ignore fantom cmds
if( name[0] == '+' || name[0] == '-' )
return; // key bindings

2
engine/common/cvar.c

@ -409,7 +409,7 @@ convar_t *Cvar_Get( const char *name, const char *value, int flags, const char * @@ -409,7 +409,7 @@ convar_t *Cvar_Get( const char *name, const char *value, int flags, const char *
// which executed from the config file. So we don't need to
// change value here: we *already* have actual value from config.
// in other cases we need to rewrite them
if( Q_strcmp( var->desc, "" ))
if( COM_CheckStringEmpty( var->desc ))
{
// directly set value
freestring( var->string );

Loading…
Cancel
Save