summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/shell/shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libmisc/shell/shell.c')
-rw-r--r--cpukit/libmisc/shell/shell.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
index 267ce203fa..78c916ecbe 100644
--- a/cpukit/libmisc/shell/shell.c
+++ b/cpukit/libmisc/shell/shell.c
@@ -498,8 +498,11 @@ rtems_boolean rtems_shell_main_loop(
if (*c == '\0') /* empty line */
continue;
- if (*c == '#') /* comment character */
+
+ if (*c == '#') { /* comment character */
+ cmd[0] = 0;
continue;
+ }
if (!strcmp(cmd,"e")) { /* edit last command */
strcpy(cmd,last_cmd);