From 8f6b3154e571ee6617c90b66a79bb7829d28baad Mon Sep 17 00:00:00 2001 From: Darkvater Date: Mon, 2 May 2005 17:05:59 +0000 Subject: [PATCH] (svn r2247) - Fix (regression): executing scripts now works (remove newline character(s)). - Fix: getting help for an alias works - Fix: '|' is an unprintable character, replace it with '\' --- console.c | 1 + console_cmds.c | 37 +++++++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/console.c b/console.c index 88e299b143..7555c9f621 100644 --- a/console.c +++ b/console.c @@ -1023,6 +1023,7 @@ void IConsoleCmdExec(const char *cmdstr) for (cmdptr = cmdstr; *cmdptr != '\0'; *cmdptr++) { if (!IsValidAsciiChar(*cmdptr)) { IConsoleError("command contains malformed characters, aborting"); + IConsolePrintF(_iconsole_color_error, "ERROR: command was: '%s'", cmdstr); return; } } diff --git a/console_cmds.c b/console_cmds.c index 69518d37cf..3fd533a227 100644 --- a/console_cmds.c +++ b/console_cmds.c @@ -193,7 +193,7 @@ DEF_CONSOLE_CMD(ConLoad) const char *file; if (argc == 0) { - IConsoleHelp("Load a game by name or index. Usage: 'load '"); + IConsoleHelp("Load a game by name or index. Usage: 'load '"); return true; } @@ -223,7 +223,7 @@ DEF_CONSOLE_CMD(ConListFiles) int i; if (argc == 0) { - IConsoleHelp("List all the files in the current dir via console. Usage: 'ls | dir'"); + IConsoleHelp("List all the files in the current dir via console. Usage: 'ls \\ dir'"); return true; } @@ -245,7 +245,7 @@ DEF_CONSOLE_CMD(ConChangeDirectory) const char *file; if (argc == 0) { - IConsoleHelp("Change the dir via console. Usage: 'cd '"); + IConsoleHelp("Change the dir via console. Usage: 'cd '"); return true; } @@ -605,6 +605,7 @@ DEF_CONSOLE_CMD(ConNetworkConnect) DEF_CONSOLE_CMD(ConExec) { char cmdline[ICON_CMDLN_SIZE]; + char *cmdptr; if (argc == 0) { IConsoleHelp("Execute a local script file. Usage: 'exec