]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fix apropos crash when it reaches cvar alias
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 6 Jun 2020 18:11:34 +0000 (18:11 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 6 Jun 2020 18:11:34 +0000 (18:11 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12647 d7cf8633-e32d-0410-b094-e92efae38249

cmd.c

diff --git a/cmd.c b/cmd.c
index 43794e8b1c4b96d52643b50a8f11d6dd6934b901..bd92ddb974e56e2f4a4268608d9b512e54957a11 100644 (file)
--- 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++;