summaryrefslogtreecommitdiffstats
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 61416fb0..24caca48 100644
--- a/regex.c
+++ b/regex.c
@@ -1897,6 +1897,8 @@ static val reg_optimize(val exp)
return t;
if (arg == nil)
return cons(oneplus_s, cons(wild_s, nil));
+ if (arg == t)
+ return cons(zeroplus_s, cons(wild_s, nil));
if (reg_single_char_p(arg))
return list(or_s,
list(optional_s, invert_single(arg), nao),