summaryrefslogtreecommitdiff
path: root/exec
diff options
context:
space:
mode:
Diffstat (limited to 'exec')
-rw-r--r--exec/hashexec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/exec/hashexec.c b/exec/hashexec.c
index b7fc591a..614845a5 100644
--- a/exec/hashexec.c
+++ b/exec/hashexec.c
@@ -340,7 +340,8 @@ check_hashbang (struct execdata *e,
memcpy (p, file_name, namelen);
p += namelen;
if (other_args)
- memcpy (p, other_args, argvlen - (other_args - new_argv));
+ memcpy (p, other_args - new_argv + argv,
+ argvlen - (other_args - new_argv));
}
else
{