From 4632745297ff7fad2ec6b6919443d1a7b9ee0e65 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 16 May 1999 20:39:53 +0000 Subject: 1999-05-16 Roland McGrath * hashexec.c (check_hashbang): Fix bug in last change. --- exec/hashexec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'exec/hashexec.c') 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. */ } } -- cgit v1.2.3