From 9aeb0e1d3064ca32e9ed182cde4daa35e4761b57 Mon Sep 17 00:00:00 2001 From: dominik Date: Mon, 13 Dec 2004 20:45:55 +0000 Subject: (svn r1073) - condebugger extended a bit [shows the commandline] (sign_de) - fixed handling of aliases with parameters (sign_de) --- console.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'console.c') diff --git a/console.c b/console.c index bee1ef813..626c062cf 100644 --- a/console.c +++ b/console.c @@ -603,7 +603,8 @@ void IConsoleAliasExec(const char* cmdline, char* tokens[20], byte tokentypes[20 i++; if (cmdline[i] == '+') { t=1; - while ((tokens[t]!=NULL) && (t<20)) { + while ((tokens[t]!=NULL) && (t<20) && + ((tokentypes[t] == ICONSOLE_VAR_STRING) || (tokentypes[t] == ICONSOLE_VAR_UNKNOWN))) { int l2 = strlen(tokens[t]); *linestream = '"'; linestream++; @@ -621,9 +622,13 @@ void IConsoleAliasExec(const char* cmdline, char* tokens[20], byte tokentypes[20 t = ((byte)cmdline[i]) - 64; if ((t<20) && (tokens[t]!=NULL)) { l2 = strlen(tokens[t]); + *linestream = '"'; + linestream++; memcpy(linestream,tokens[t],l2); - x += l2; linestream += l2; + *linestream = '"'; + linestream++; + x += l2+2; } } } else if (cmdline[i] == '\\') { @@ -659,9 +664,11 @@ void IConsoleAliasExec(const char* cmdline, char* tokens[20], byte tokentypes[20 *linestream = '\0'; } - free(linestream_s); + for (i=0; i