From 04f242c2bd2a11c18ad04ca48b6b63cedc8ecb04 Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Sat, 6 Jun 2020 18:11:34 +0000 Subject: [PATCH] Fix apropos crash when it reaches cvar alias git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12647 d7cf8633-e32d-0410-b094-e92efae38249 --- cmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd.c b/cmd.c index 43794e8b..bd92ddb9 100644 --- a/cmd.c +++ b/cmd.c @@ -1446,8 +1446,10 @@ static void Cmd_Apropos_f(cmd_state_t *cmd) for (cvar = cmd->cvars->vars; cvar; cvar = cvar->next) { if (!matchpattern_with_separator(cvar->name, partial, true, "", false)) - if (!matchpattern_with_separator(cvar->description, partial, true, "", false)) continue; + if (!(cvar->flags & CVAR_ALIAS)) + if (!matchpattern_with_separator(cvar->description, partial, true, "", false)) + continue; Con_Printf ("cvar "); Cvar_PrintHelp(cvar, true); count++; -- 2.39.2