summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--regex.c10
2 files changed, 6 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 116fc67d..f3f76c24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-14 Kaz Kylheku <kkylheku@gmail.com>
+
+ * regex.c (reg_derivative): Bugfix: remove invalid
+ algebraic reductions in the derivative for the operator.
+
2010-01-13 Kaz Kylheku <kkylheku@gmail.com>
Bugfix: allow unescaped / to be used in regex character classes.
diff --git a/regex.c b/regex.c
index a45339d5..5e5fd66f 100644
--- a/regex.c
+++ b/regex.c
@@ -1279,15 +1279,7 @@ static val reg_derivative(val exp, val ch)
return cons(sym, cons(reg_derivative(first(args), ch), nil));
} else if (sym == or_s) {
val d_arg1 = reg_derivative(first(args), ch);
- val d_arg2 = nil;
-
- if (d_arg1 == nil)
- return nil;
-
- d_arg2 = reg_derivative(second(args), ch);
-
- if (d_arg2 == nil)
- return nil;
+ val d_arg2 = reg_derivative(second(args), ch);
if (d_arg1 == t)
return d_arg2;