cvar: Rename aliasindex to aliases_size and only use it for size of the aliases array...
[xonotic/darkplaces.git] / cmd.c
diff --git a/cmd.c b/cmd.c
index 525be466796515ca4ae98f96e183aebe5b4afbd0..8fef16f446aa45c44d7d7c4272617a5b44d43a4d 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -1594,12 +1594,12 @@ static void Cmd_Apropos_f(cmd_state_t *cmd)
                        Cvar_PrintHelp(cvar, cvar->name, true);
                        count++;
                }
-               for (int i = 0; i < cvar->aliasindex; i++)
+               for (char **cvar_alias = cvar->aliases; cvar_alias && *cvar_alias; cvar_alias++)
                {
-                       if (matchpattern_with_separator(cvar->aliases[i], partial, true, "", false))
+                       if (matchpattern_with_separator(*cvar_alias, partial, true, "", false))
                        {
                                Con_Printf ("cvar ");
-                               Cvar_PrintHelp(cvar, cvar->aliases[i], true);
+                               Cvar_PrintHelp(cvar, *cvar_alias, true);
                                count++;
                        }
                }