From 459293b1c536515fbe7fafbae9932aefadb2fbaf Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 29 Sep 2016 17:58:58 +0200 Subject: ash: fix arithmetic closing )) split by backslash-newline Signed-off-by: Denys Vlasenko --- shell/ash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shell/ash.c') diff --git a/shell/ash.c b/shell/ash.c index b71fc0299..97f8d9377 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -11437,7 +11437,7 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs) if (parenlevel > 0) { parenlevel--; } else { - if (pgetc() == ')') { + if (pgetc_eatbnl() == ')') { c = CTLENDARI; if (--arinest == 0) { syntax = prevsyntax; @@ -11464,6 +11464,7 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs) if (varnest == 0) { #if ENABLE_ASH_BASH_COMPAT if (c == '&') { +//Can't call pgetc_eatbnl() here, this requires three-deep pungetc() if (pgetc() == '>') c = 0x100 + '>'; /* flag &> */ pungetc(); -- cgit v1.2.3