summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-05-16 20:39:53 +0000
committerRoland McGrath <roland@gnu.org>1999-05-16 20:39:53 +0000
commit4632745297ff7fad2ec6b6919443d1a7b9ee0e65 (patch)
treef24f8621f795c3e55b410ce5294d9d2afc456ef3
parent6c2bd462bcec50aea2e4e52c1eb061df956f5779 (diff)
1999-05-16 Roland McGrath <roland@baalperazim.frob.com>
* hashexec.c (check_hashbang): Fix bug in last change.
-rw-r--r--exec/hashexec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/exec/hashexec.c b/exec/hashexec.c
index 4b8eae4f..9f7a8e43 100644
--- a/exec/hashexec.c
+++ b/exec/hashexec.c
@@ -161,11 +161,10 @@ check_hashbang (struct execdata *e,
arg = NULL;
else
{
- size_t i = len - 1;
/* Trim trailing blanks after the argument. */
+ size_t i = len - 1;
while (arg[i] == ' ' || arg[i] == '\t')
- --i;
- arg[i] = '\0';
+ arg[i--] = '\0';
len = i + 2; /* Include the terminating null. */
}
}