diff options
Diffstat (limited to 'Src/parse.c')
-rw-r--r-- | Src/parse.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Src/parse.c b/Src/parse.c index 658a66660..d0a9bc45f 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -623,6 +623,12 @@ par_case(Cmd c) } if (*s || pct || s == str + 1) YYERRORV; + /* Simplify pattern by removing surrounding (...) */ + sl = strlen(str); + DPUTS(str[1] != Inpar || str[sl-1] != Outpar, + "BUG: strange case pattern"); + str[sl-1] = '\0'; + chuck(str+1); break; } else { char *str2; |