diff options
-rw-r--r-- | exec/hashexec.c | 5 |
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. */ } } |