diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-27 19:17:14 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-27 19:17:14 -0700 |
commit | 8942eea65595fb5ecee17af71c466b44d1bce741 (patch) | |
tree | 60c449b5cfd7ad16761b8a3db59282d4dd27dbee /regex.c | |
parent | 8b00d2d1919c204ff653863ff0485f483d418ff4 (diff) | |
download | txr-8942eea65595fb5ecee17af71c466b44d1bce741.tar.gz txr-8942eea65595fb5ecee17af71c466b44d1bce741.tar.bz2 txr-8942eea65595fb5ecee17af71c466b44d1bce741.zip |
Bug in complement case of reg_matches_all.
* regex.c (reg_matches_all): A complement matches all if
its argument matches nothing, not if its argument
is anything but the empty match nil.
Diffstat (limited to 'regex.c')
-rw-r--r-- | regex.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1479,7 +1479,8 @@ static val reg_matches_all(val exp) } else if (sym == optional_s) { return reg_matches_all(car(args)); } else if (sym == compl_s) { - return tnil(car(args)); + val arg = car(args); + return if2(arg == t, t); } else if (sym == or_s) { return tnil(reg_matches_all(pop(&args)) || reg_matches_all(pop(&args))); } else if (sym == and_s) { |