diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-06-15 12:38:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-06-15 12:38:50 +0200 |
commit | 75313e6fead3b82a4be2d37b341a735f7b61279b (patch) | |
tree | f70086f978fb017bae21ece103d37eaddaaedf52 /build2/algorithm.cxx | |
parent | 43e66db85be91716b469bef435328d4243b536b7 (diff) |
Add sanity check
Diffstat (limited to 'build2/algorithm.cxx')
-rw-r--r-- | build2/algorithm.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx index 6743907..7e68a36 100644 --- a/build2/algorithm.cxx +++ b/build2/algorithm.cxx @@ -439,6 +439,8 @@ namespace build2 const rule_match* r (match_impl (a, t, nullptr, try_match)); + assert (l.offset != target::offset_tried); // Should have failed. + if (r == nullptr) // Not found (try_match == true). { l.offset = target::offset_tried; |