1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

17760: Fix case-pattern parsing bug in sh emulation.

This commit is contained in:
Bart Schaefer 2002-10-06 18:38:14 +00:00
parent fbc08ff52c
commit d4c7657014
2 changed files with 8 additions and 2 deletions

View file

@ -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();

View file

@ -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"))