summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/exec.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6af28f976..145e9fbc2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-09-13  Peter Stephenson  <p.stephenson@samsung.com>
+
+	* 39305: Src/exec.c: error handling on substitution for here
+	document was illogical.
+
 2016-09-12  Oliver Kiddle  <opk@zsh.org>
 
 	* 39295: Completion/Unix/Type/_remote_files: allow '--' to
diff --git a/Src/exec.c b/Src/exec.c
index 2e251b939..cfd633add 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4034,7 +4034,7 @@ gethere(char **strp, int typ)
 
 	parsestr(&buf);
 
-	if (!errflag) {
+	if (!(errflag & ERRFLAG_ERROR)) {
 	    /* Retain any user interrupt error */
 	    errflag = ef | (errflag & ERRFLAG_INT);
 	}