From 3d434cfb158549ee4f78f1d58a0b0d9628cdda12 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Mon, 9 Oct 1995 17:56:32 +0000 Subject: [PATCH] Fix my breakage of the $0 handling during $ENV processing. Since the broken version went into 2.1, this fix should, too. --- bin/sh/options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sh/options.c b/bin/sh/options.c index de6f60ce7fb9..5613302132f5 100644 --- a/bin/sh/options.c +++ b/bin/sh/options.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: options.c,v 1.4 1995/08/06 19:35:33 joerg Exp $ + * $Id: options.c,v 1.5 1995/10/01 15:11:42 joerg Exp $ */ #ifndef lint @@ -106,7 +106,7 @@ procargs(argc, argv) commandname = arg0 = *argptr++; setinputfile(commandname, 0); } - if (minusc) + if (*argptr && minusc) /* Posix.2: first arg after -c cmd is $0, remainder $1... */ arg0 = *argptr++; shellparam.p = argptr;