diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-03-16 14:05:55 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-03-16 14:05:55 +0000 |
commit | 0a973a9ea9c04c462666ca0d89e2cbba77fd2d84 (patch) | |
tree | d2ff82ce96f814d986812deda2db68657e747c36 /cpukit/libmisc/shell | |
parent | New. (diff) | |
download | rtems-0a973a9ea9c04c462666ca0d89e2cbba77fd2d84.tar.bz2 |
2010-03-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/shell/shell_makeargs.c: Fix bugs introduced by patch
attempting to add quoted arguments.
Diffstat (limited to 'cpukit/libmisc/shell')
-rw-r--r-- | cpukit/libmisc/shell/shell_makeargs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cpukit/libmisc/shell/shell_makeargs.c b/cpukit/libmisc/shell/shell_makeargs.c index 248a8c6a89..727ea829c9 100644 --- a/cpukit/libmisc/shell/shell_makeargs.c +++ b/cpukit/libmisc/shell/shell_makeargs.c @@ -40,13 +40,15 @@ int rtems_shell_make_args( break; if ( *ch == '"' ) { - argv_p[ argc++ ] = ++ch; - while ( ( *ch == '\0' ) && ( *ch != '"' ) ) ch++; + argv_p[ argc ] = ++ch; + while ( ( *ch != '\0' ) && ( *ch != '"' ) ) ch++; } else { - argv_p[ argc++ ] = ch; - while ( ( *ch == '\0' ) && ( !isspace((unsigned char)*ch) ) ) ch++; + argv_p[ argc ] = ch; + while ( ( *ch != '\0' ) && ( !isspace((unsigned char)*ch) ) ) ch++; } + argc++; + if ( *ch == '\0' ) break; |