summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regex.c b/regex.c
index 9268b31f9b..d8cbfc0990 100644
--- a/regex.c
+++ b/regex.c
@@ -1439,8 +1439,7 @@ re_compile_pattern(pattern, size, bufp)
}
range_retry:
if (range && had_char_class) {
- FREE_AND_RETURN(stackb, "invalid regular expression; can't use character class as a end value of range");
- goto invalid_pattern;
+ FREE_AND_RETURN(stackb, "invalid regular expression; can't use character class as an end value of range");
}
PATFETCH(c);
@@ -1463,6 +1462,7 @@ re_compile_pattern(pattern, size, bufp)
PATFETCH_MBC(c);
had_mbchar++;
}
+ had_char_class = 0;
/* \ escapes characters when inside [...]. */
if (c == '\\') {