]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cmd.c
Correct names in credits and make them more consistent.
[xonotic/darkplaces.git] / cmd.c
diff --git a/cmd.c b/cmd.c
index ba6aec5bd6c19385818b05310e795041f83058a3..8d6d1ead88203454112c6600933795b0eae062dc 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -142,7 +142,7 @@ static void Cmd_Centerprint_f (void)
                        strlcat(msg, " ", sizeof(msg));
                        strlcat(msg, Cmd_Argv(i), sizeof(msg));
                }
-               c = strlen(msg);
+               c = (unsigned int)strlen(msg);
                for(p = 0, i = 0; i < c; ++i)
                {
                        if(msg[i] == '\\')
@@ -219,7 +219,7 @@ void Cbuf_InsertText (const char *text)
        {
                // we don't have a SZ_Prepend, so...
                memmove(cmd_text.data + l, cmd_text.data, cmd_text.cursize);
-               cmd_text.cursize += l;
+               cmd_text.cursize += (int)l;
                memcpy(cmd_text.data, text, l);
        }
        Cbuf_UnlockThreadMutex();
@@ -283,7 +283,7 @@ void Cbuf_Execute (void)
        qboolean quotes;
        char *comment;
 
-       // LordHavoc: making sure the tokenizebuffer doesn't get filled up by repeated crashes
+       // LadyHavoc: making sure the tokenizebuffer doesn't get filled up by repeated crashes
        cmd_tokenizebufferpos = 0;
 
        while (cmd_text.cursize)
@@ -461,7 +461,9 @@ static void Cmd_Exec(const char *filename)
 {
        char *f;
        size_t filenameLen = strlen(filename);
-       qboolean isdefaultcfg = filenameLen >= 11 && !strcmp(filename + filenameLen - 11, "default.cfg");
+       qboolean isdefaultcfg =
+               !strcmp(filename, "default.cfg") ||
+               (filenameLen >= 12 && !strcmp(filename + filenameLen - 12, "/default.cfg"));
 
        if (!strcmp(filename, "config.cfg"))
        {
@@ -974,7 +976,7 @@ static const char *Cmd_GetDirectCvarValue(const char *varname, cmdalias_t *alias
        cvar_t *cvar;
        long argno;
        char *endptr;
-       char vabuf[1024];
+       static char vabuf[1024]; // cmd_mutex
 
        if(is_multiple)
                *is_multiple = false;
@@ -1781,7 +1783,7 @@ const char **Cmd_CompleteBuildList (const char *partial)
        return buf;
 }
 
-// written by LordHavoc
+// written by LadyHavoc
 void Cmd_CompleteCommandPrint (const char *partial)
 {
        cmd_function_t *cmd;
@@ -1819,7 +1821,7 @@ const char *Cmd_CompleteAlias (const char *partial)
        return NULL;
 }
 
-// written by LordHavoc
+// written by LadyHavoc
 void Cmd_CompleteAliasPrint (const char *partial)
 {
        cmdalias_t *alias;
@@ -2011,7 +2013,7 @@ void Cmd_ForwardStringToServer (const char *s)
        if (!cls.netcon)
                return;
 
-       // LordHavoc: thanks to Fuh for bringing the pure evil of SZ_Print to my
+       // LadyHavoc: thanks to Fuh for bringing the pure evil of SZ_Print to my
        // attention, it has been eradicated from here, its only (former) use in
        // all of darkplaces.
        if (cls.protocol == PROTOCOL_QUAKEWORLD)
@@ -2106,7 +2108,7 @@ void Cmd_ForwardStringToServer (const char *s)
                                        break;
                                }
                                // write the resulting text
-                               SZ_Write(&cls.netcon->message, (unsigned char *)temp, strlen(temp));
+                               SZ_Write(&cls.netcon->message, (unsigned char *)temp, (int)strlen(temp));
                                s += 2;
                                continue;
                        }