about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 91f95fe24..d37acd902 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1799,8 +1799,11 @@ execcmd(Cmd cmd, int input, int output, int how, int last1)
 	is_exec = 1;
     }
 
-    if (args && !(cflags & BINF_NOGLOB))
+    if (args && !(cflags & BINF_NOGLOB)) {
+	LinkList oargs = args;
 	globlist(args);
+	args=oargs;
+    }
     if (errflag) {
 	lastval = 1;
 	goto err;