summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--regex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regex.c b/regex.c
index a1294ca9..4d6a60eb 100644
--- a/regex.c
+++ b/regex.c
@@ -2037,7 +2037,7 @@ static void print_class_char(val ch, val first_p, val stream)
if (!first_p)
break;
/* fallthrough */
- case '-':
+ case '-': case '[': case ']':
put_char(chr('\\'), stream);
break;
}