Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 May 2010 10:20:54 +0000 (UTC)
From:      Stefan Farfeleder <stefanf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r208135 - stable/7/bin/sh
Message-ID:  <201005161020.o4GAKsrw070128@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: stefanf
Date: Sun May 16 10:20:54 2010
New Revision: 208135
URL: http://svn.freebsd.org/changeset/base/208135

Log:
  Merge r190698: Don't let trailing empty lines overwrite the result of the last
  command with 0.

Modified:
  stable/7/bin/sh/eval.c
Directory Properties:
  stable/7/bin/sh/   (props changed)

Modified: stable/7/bin/sh/eval.c
==============================================================================
--- stable/7/bin/sh/eval.c	Sun May 16 10:01:06 2010	(r208134)
+++ stable/7/bin/sh/eval.c	Sun May 16 10:20:54 2010	(r208135)
@@ -166,7 +166,8 @@ evalstring(char *s)
 	setstackmark(&smark);
 	setinputstring(s, 1);
 	while ((n = parsecmd(0)) != NEOF) {
-		evaltree(n, 0);
+		if (n != NULL)
+			evaltree(n, 0);
 		popstackmark(&smark);
 	}
 	popfile();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005161020.o4GAKsrw070128>