]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix $cvar expansion to work in quotes
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 4 Jul 2007 22:26:11 +0000 (22:26 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 4 Jul 2007 22:26:11 +0000 (22:26 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7466 d7cf8633-e32d-0410-b094-e92efae38249

cmd.c

diff --git a/cmd.c b/cmd.c
index 00aa78ba00bda6298494e3cfc82bf98c3da610de..361463cf0097f99a0a114255dedf06276c572303 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -511,7 +511,6 @@ Preprocesses strings and replaces $*, $param#, $cvar accordingly
 static void Cmd_PreprocessString( const char *intext, char *outtext, unsigned maxoutlen, cmdalias_t *alias ) {
        const char *in;
        unsigned outlen;
-       int inquote;
 
        // don't crash if there's no room in the outtext buffer
        if( maxoutlen == 0 ) {
@@ -521,10 +520,9 @@ static void Cmd_PreprocessString( const char *intext, char *outtext, unsigned ma
 
        in = intext;
        outlen = 0;
-       inquote = 0;
 
        while( *in && outlen < maxoutlen ) {
-               if( *in == '$' && !inquote ) {
+               if( *in == '$' ) {
                        // this is some kind of expansion, see what comes after the $
                        in++;
                        // replacements that can always be used:
@@ -586,9 +584,6 @@ static void Cmd_PreprocessString( const char *intext, char *outtext, unsigned ma
                                }
                        }
                } else {
-                       if( *in == '"' ) {
-                               inquote ^= 1;
-                       }
                        outtext[outlen++] = *in++;
                }
        }