about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Src/exec.c b/Src/exec.c
index ee55aac8c..64cf5ae46 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4435,16 +4435,16 @@ gethere(char **strp, int typ)
 		bptr = buf + bsiz;
 		bsiz *= 2;
 	    }
-	    if (lexstop)
+	    if (lexstop || c == '\n')
 		break;
-	    if (c == '\n') {
-		if (!qt && bptr > t && *(bptr - 1) == '\\') {
-		    /* line continuation */
+	    if (!qt && c == '\\') {
+		*bptr++ = c;
+		c = hgetc();
+		if (c == '\n') {
 		    bptr--;
 		    c = hgetc();
 		    continue;
-		} else
-		    break;
+		}
 	    }
 	    *bptr++ = c;
 	    c = hgetc();