aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 2cebfe2c0..e0828d4a7 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11592,11 +11592,17 @@ checkend: {
11592 if (c == *eofmark) { 11592 if (c == *eofmark) {
11593 if (pfgets(line, sizeof(line)) != NULL) { 11593 if (pfgets(line, sizeof(line)) != NULL) {
11594 char *p, *q; 11594 char *p, *q;
11595 int cc;
11595 11596
11596 p = line; 11597 p = line;
11597 for (q = eofmark + 1; *q && *p == *q; p++, q++) 11598 for (q = eofmark + 1;; p++, q++) {
11598 continue; 11599 cc = *p;
11599 if (*p == '\n' && *q == '\0') { 11600 if (cc == '\n')
11601 cc = 0;
11602 if (!*q || cc != *q)
11603 break;
11604 }
11605 if (cc == *q) {
11600 c = PEOF; 11606 c = PEOF;
11601 nlnoprompt(); 11607 nlnoprompt();
11602 } else { 11608 } else {