diff options
-rw-r--r-- | shell/ash.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 59aa336cd..2146349ab 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -3729,7 +3729,10 @@ repeat: for (ap = argv; *ap; ap++) ; ap = new = ckmalloc((ap - argv + 2) * sizeof(char *)); - *ap++ = cmd = (char *)DEFAULT_SHELL; + ap[1] = cmd; + *ap = cmd = (char *)DEFAULT_SHELL; + ap += 2; + argv++; while ((*ap++ = *argv++)) ; argv = new; |