]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
command parsing: make "bind" and "in_bind" have the same parsing exception as "alias...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 14 Jul 2007 07:06:15 +0000 (07:06 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 14 Jul 2007 07:06:15 +0000 (07:06 +0000)
This fixes binds using cvars when written to the config file.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7486 d7cf8633-e32d-0410-b094-e92efae38249

cmd.c

diff --git a/cmd.c b/cmd.c
index dbaf45690128c9fa0cc94062065678e603905fb1..d94857655984e47d91cd23c2fe2c0b295c13edff 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -186,7 +186,13 @@ void Cbuf_Execute (void)
 
 // execute the command line
                firstchar = line + strspn(line, " \t");
-               if(strncmp(firstchar, "alias", 5) || (firstchar[5] != ' ' && firstchar[5] != '\t'))
+               if(
+                       (strncmp(firstchar, "alias", 5) || (firstchar[5] != ' ' && firstchar[5] != '\t'))
+                       &&
+                       (strncmp(firstchar, "bind", 4) || (firstchar[4] != ' ' && firstchar[4] != '\t'))
+                       &&
+                       (strncmp(firstchar, "in_bind", 7) || (firstchar[7] != ' ' && firstchar[7] != '\t'))
+               )
                {
                        Cmd_PreprocessString( line, preprocessed, sizeof(preprocessed), NULL );
                        Cmd_ExecuteString (preprocessed, src_command);