summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 59aa336..2146349 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;