From 4fcf642ab8c87b9cd34580c69c2bccded2d8fd83 Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 14 Jul 2007 07:06:15 +0000 Subject: [PATCH] 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 --- cmd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); -- 2.39.2