summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-10-09 17:56:32 +0000
committerjoerg <joerg@FreeBSD.org>1995-10-09 17:56:32 +0000
commit1b4761e6b2785c1f95adba0794cbb4f6ae69629a (patch)
treeb060be36075b18d967ea92df07b1544405e9ca74 /bin
parentbe110e87c8873066ed715a2b47fc226a507834fa (diff)
downloadFreeBSD-src-1b4761e6b2785c1f95adba0794cbb4f6ae69629a.zip
FreeBSD-src-1b4761e6b2785c1f95adba0794cbb4f6ae69629a.tar.gz
Fix my breakage of the $0 handling during $ENV processing.
Since the broken version went into 2.1, this fix should, too.
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/sh/options.c b/bin/sh/options.c
index de6f60c..5613302 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;
OpenPOWER on IntegriCloud