From: divverent Date: Sat, 14 Jul 2007 07:06:15 +0000 (+0000) Subject: command parsing: make "bind" and "in_bind" have the same parsing exception as "alias... X-Git-Tag: xonotic-v0.1.0preview~2979 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4fcf642ab8c87b9cd34580c69c2bccded2d8fd83;p=xonotic%2Fdarkplaces.git command parsing: make "bind" and "in_bind" have the same parsing exception as "alias": no cvar expansion takes place when executing these commands, unless the command names are quoted or "hidden" in some other way 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 --- diff --git a/cmd.c b/cmd.c index dbaf4569..d9485765 100644 --- 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);