about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2002-10-06 18:38:14 +0000
committerBart Schaefer <barts@users.sourceforge.net>2002-10-06 18:38:14 +0000
commitd4c7657014ea9bdeedb214b36ff3d7ce6e8af2e4 (patch)
tree4c04ddce5d306618cd86c8a5dc5d26671f5620af /Src
parentfbc08ff52c45e1e42a69507ff386b8de2e0457dc (diff)
downloadzsh-d4c7657014ea9bdeedb214b36ff3d7ce6e8af2e4.tar.gz
zsh-d4c7657014ea9bdeedb214b36ff3d7ce6e8af2e4.tar.xz
zsh-d4c7657014ea9bdeedb214b36ff3d7ce6e8af2e4.zip
17760: Fix case-pattern parsing bug in sh emulation.
Diffstat (limited to 'Src')
-rw-r--r--Src/lex.c8
-rw-r--r--Src/parse.c2
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"))