summaryrefslogtreecommitdiff
path: root/exec
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-10-18 08:23:00 +0000
committerRoland McGrath <roland@gnu.org>1995-10-18 08:23:00 +0000
commit6bf0d7402fe2df7172912328591b161de98b025f (patch)
tree0f31174ac485e7126eb1ffd95914f7ffd2a63c11 /exec
parentc644738bc56c2e10cd4eeaba9971ef5e953c4833 (diff)
(check_hashbang): Copy passed args from the right place.
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
{