svn commit: r208135 - stable/7/bin/sh

Stefan Farfeleder stefanf at FreeBSD.org
Sun May 16 10:20:54 UTC 2010


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();


More information about the svn-src-all mailing list