console.c
changeset 640 b1f21d1ac4d3
parent 634 88d9420048db
child 644 e833509107ad
--- a/console.c	Mon Dec 13 20:12:45 2004 +0000
+++ b/console.c	Mon Dec 13 20:45:55 2004 +0000
@@ -603,7 +603,8 @@
 			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 @@
 				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 @@
 		*linestream = '\0';
 	}
 
+	for (i=0; i<c; i++)	{
+		IConsoleCmdExec(lines[i]);
+	}
+
 	free(linestream_s);
-
-	for (i=0; i<c; i++)	IConsoleCmdExec(lines[i]);
 }
 
 void IConsoleVarInsert(_iconsole_var* item_new, const char* name)
@@ -1035,6 +1042,9 @@
 	int i;
 	int l;
 
+	if (_stdlib_con_developer)
+		IConsolePrintF(_iconsole_color_debug, "CONDEBUG: execution_cmdline: %s", cmdstr);
+
 	//** clearing buffer **//
 
 	for (i = 0; i < 20; i++) {