summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/regex.c b/regex.c
index 655d2f077e..b7245d4494 100644
--- a/regex.c
+++ b/regex.c
@@ -1675,6 +1675,8 @@ re_compile_pattern(pattern, size, bufp)
if (last > c)
goto invalid_pattern;
+ if (last == '-' || c == '-')
+ re_warning("character class has `-' without escape");
range = 0;
if (had_mbchar == 0) {
for (;last<=c;last++)