summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>2000-07-20 19:40:47 +0000
committerThomas Bushnell <thomas@gnu.org>2000-07-20 19:40:47 +0000
commit0e0bcad3e157579dbeafec933ac6ccbc00a515a3 (patch)
tree750f52f28b3bc3796fc721591184c0ed225b3737
parentc4a7249150997ac38e46a45439ba4d986a253d84 (diff)
2000-07-20 Thomas Bushnell, BSG <tb@mit.edu>
* hashexec.c (check_hashbang): Count characters in interp correctly. Fix from Kalle Olavi Niemitalo <tosi@stekt.oulu.fi>.
-rw-r--r--exec/ChangeLog5
-rw-r--r--exec/hashexec.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/exec/ChangeLog b/exec/ChangeLog
index c690ef9c..06538f37 100644
--- a/exec/ChangeLog
+++ b/exec/ChangeLog
@@ -1,3 +1,8 @@
+2000-07-20 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * hashexec.c (check_hashbang): Count characters in interp
+ correctly. Fix from Kalle Olavi Niemitalo <tosi@stekt.oulu.fi>.
+
2000-03-23 Mark Kettenis <kettenis@gnu.org>
* exec.c (do_exec): Set interp.file to MACH_PORT_NULL before the
diff --git a/exec/hashexec.c b/exec/hashexec.c
index 4b4ff47e..f4e1f9d3 100644
--- a/exec/hashexec.c
+++ b/exec/hashexec.c
@@ -178,7 +178,7 @@ check_hashbang (struct execdata *e,
arg = p + strspn (p, " \t");
arg_len = interp_len - 1 - (arg - interp_buf); /* without null here */
- interp_len = p + 1 - interp; /* This one includes the null. */
+ interp_len = p - interp; /* This one includes the null. */
if (arg_len == 0)
arg = NULL;