diff options
author | Peter Stephenson <pws@zsh.org> | 2017-03-07 10:43:58 +0000 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2017-03-07 10:43:58 +0000 |
commit | f3f8537cfa05414ad14494e809d9ebfeef86ebbc (patch) | |
tree | cfb02314dd129609ef3d6fc85ce75fc63b8c9582 /Src/pattern.c | |
parent | a8345a40b1a79bb3a5c524ccf5fedf78040ae40e (diff) | |
download | zsh-f3f8537cfa05414ad14494e809d9ebfeef86ebbc.tar.gz zsh-f3f8537cfa05414ad14494e809d9ebfeef86ebbc.tar.xz zsh-f3f8537cfa05414ad14494e809d9ebfeef86ebbc.zip |
40760: Always tokenize unquoted - to Dash.
This fixes use of pattern match character ranges in unusual contexts. Attempt to detect a tokenized - in cases where we don't care.
Diffstat (limited to 'Src/pattern.c')
-rw-r--r-- | Src/pattern.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/pattern.c b/Src/pattern.c index 928790f45..75db01634 100644 --- a/Src/pattern.c +++ b/Src/pattern.c @@ -1521,7 +1521,7 @@ patcomppiece(int *flagp, int paren) patparse = nptr; len |= 1; } - DPUTS(*patparse != '-', "BUG: - missing from numeric glob"); + DPUTS(!IS_DASH(*patparse), "BUG: - missing from numeric glob"); patparse++; if (idigit(*patparse)) { to = (zrange_t) zstrtol((char *)patparse, |