git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7466
d7cf8633-e32d-0410-b094-
e92efae38249
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 ) {
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:
}
}
} else {
- if( *in == '"' ) {
- inquote ^= 1;
- }
outtext[outlen++] = *in++;
}
}