aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/algorithm.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-10-26 09:42:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-10-26 13:29:25 +0200
commit37cccafddbaeb3661998125ef41775ba974ed149 (patch)
treefd1814dd61e2a17d0aa40c87ac4741eb104701f3 /libbuild2/algorithm.cxx
parent185afee482b707a49c445a5d001dd20c31f1aa75 (diff)
WIP: fixes for match options
Diffstat (limited to 'libbuild2/algorithm.cxx')
-rw-r--r--libbuild2/algorithm.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbuild2/algorithm.cxx b/libbuild2/algorithm.cxx
index 0c90642..bc4b835 100644
--- a/libbuild2/algorithm.cxx
+++ b/libbuild2/algorithm.cxx
@@ -1241,8 +1241,8 @@ namespace build2
// Reapply if any new options.
//
match_extra& me (s.match_extra);
- assert ((me.cur_options & options) != options); // Otherwise no lock.
- me.new_options = options;
+ me.new_options = options & ~me.cur_options; // Clear existing.
+ assert (me.new_options != 0); // Otherwise should not have locked.
// Feels like this can only be a logic bug since to end up with a
// subset of options requires a rule (see match_extra for details).