diff options
Diffstat (limited to 'newlib/libc/posix/wordexp.c')
-rw-r--r-- | newlib/libc/posix/wordexp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/newlib/libc/posix/wordexp.c b/newlib/libc/posix/wordexp.c index bfdb63f..b6c4a6d 100644 --- a/newlib/libc/posix/wordexp.c +++ b/newlib/libc/posix/wordexp.c @@ -37,6 +37,7 @@ wordexp(const char *words, wordexp_t *pwordexp, int flags) char *iter; pid_t pid; int num_words = 0; + int num_bytes = 0; int fd[2]; int fd_err[2]; int err = 0; @@ -128,6 +129,8 @@ wordexp(const char *words, wordexp_t *pwordexp, int flags) if((iter = strchr(tmp, '\n'))) *iter = '\0'; + num_bytes = atoi(tmp) + pwordexp->we_wordc; + /* Get each expansion from the shell output, and store each in pwordexp's we_wordv vector. */ for(i = 0; i < num_words; i++) |