aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/algorithm.cxx
diff options
context:
space:
mode:
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).