From 75313e6fead3b82a4be2d37b341a735f7b61279b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 15 Jun 2018 12:38:50 +0200 Subject: Add sanity check --- build2/algorithm.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build2/algorithm.cxx') 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; -- cgit v1.1