]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cmd.c
Call cvar callbacks after the cvar is set. Potentially fixes heap corruption.
[xonotic/darkplaces.git] / cmd.c
diff --git a/cmd.c b/cmd.c
index 010568de53985ecae6fe27ca0a46077d3258b98a..ea0b608eecfab77ade1a7bca311d3ce0ca4e85dc 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -410,7 +410,7 @@ static void Cmd_StuffCmds_f (cmd_state_t *cmd)
        int             i, j, l;
        // this is for all commandline options combined (and is bounds checked)
        char    build[MAX_INPUTLINE];
-
+       
        // come back later so we don't crash
        if(host.state == host_init)
                return;
@@ -1520,12 +1520,9 @@ void Cmd_Init(void)
        // server commands received from clients have no reason to access cvars, cvar expansion seems perilous.
        cmd_serverfromclient.cvars = &cvars_null;
        cmd_serverfromclient.cvars_flagsmask = 0;
-       cmd_serverfromclient.cmd_flags = CMD_SERVER_FROM_CLIENT;
+       cmd_serverfromclient.cmd_flags = CMD_SERVER_FROM_CLIENT | CMD_USERINFO;
        cmd_serverfromclient.userdefined = &cmd_userdefined_null;
-}
 
-void Cmd_Init_Commands(qboolean dedicated_server)
-{
 //
 // register our commands
 //