]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cmd.c
skel_build: normalize the per-bone matrices
[xonotic/darkplaces.git] / cmd.c
diff --git a/cmd.c b/cmd.c
index 51d3f0c1bedcc78a04bf7002e3b7b09b6ac8ecc1..4d615f1a23c9b1dcc8aed5cf04d85ef7ba077118 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -463,7 +463,8 @@ static void Cmd_StuffCmds_f (void)
 static void Cmd_Exec(const char *filename)
 {
        char *f;
-       qboolean isdefaultcfg = strlen(filename) >= 11 && !strcmp(filename + strlen(filename) - 11, "default.cfg");
+       size_t filenameLen = strlen(filename);
+       qboolean isdefaultcfg = filenameLen >= 11 && !strcmp(filename + filenameLen - 11, "default.cfg");
 
        if (!strcmp(filename, "config.cfg"))
        {
@@ -1199,15 +1200,15 @@ static void Cmd_List_f (void)
        {
                partial = Cmd_Argv (1);
                len = strlen(partial);
+               ispattern = (strchr(partial, '*') || strchr(partial, '?'));
        }
        else
        {
                partial = NULL;
                len = 0;
+               ispattern = false;
        }
 
-       ispattern = partial && (strchr(partial, '*') || strchr(partial, '?'));
-
        count = 0;
        for (cmd = cmd_functions; cmd; cmd = cmd->next)
        {