diff options
-rw-r--r-- | Src/lex.c | 8 | ||||
-rw-r--r-- | Src/parse.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Src/lex.c b/Src/lex.c index 7c7d264f2..8c6ae71c0 100644 --- a/Src/lex.c +++ b/Src/lex.c @@ -993,8 +993,12 @@ gettokstr(int c, int sub) c = Outbrack; break; case LX2_INPAR: - if ((sub || in_brace_param) && isset(SHGLOB)) - break; + if (isset(SHGLOB)) { + if (sub || in_brace_param) + break; + if (incasepat && !len) + return INPAR; + } if (!in_brace_param) { if (!sub) { e = hgetc(); diff --git a/Src/parse.c b/Src/parse.c index b53b36a0e..a6c4cd10b 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -1042,6 +1042,8 @@ par_case(int *complex) yylex(); if (tok == OUTBRACE) break; + if (tok == INPAR) + yylex(); if (tok != STRING) YYERRORV(oecused); if (!strcmp(tokstr, "esac")) |