diff options
Diffstat (limited to 'jimregexp.c')
-rw-r--r-- | jimregexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jimregexp.c b/jimregexp.c index 45f7c31..dbb49e9 100644 --- a/jimregexp.c +++ b/jimregexp.c @@ -711,7 +711,7 @@ static int regatom(regex_t *preg, int *flagp) return 0; } } - if (pattern[0] == '-' && pattern[1]) { + if (pattern[0] == '-' && pattern[1] && pattern[1] != ']') { /* skip '-' */ pattern += utf8_tounicode(pattern, &end); pattern += reg_utf8_tounicode_case(pattern, &end, nocase); |