From 5352f2fb6b911c804e70ea98c1bb335c54fea6b5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 9 Aug 2016 08:12:13 +0200 Subject: Fix bug in inner/outer operation handling --- build2/algorithm.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build2/algorithm.cxx') diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx index fea3d25..a7126cc 100644 --- a/build2/algorithm.cxx +++ b/build2/algorithm.cxx @@ -69,7 +69,9 @@ namespace build2 // both inner and outer operations match. // for (operation_id oo (a.outer_operation ()), io (a.operation ()), - o (oo != 0 ? oo : io); o != 0; o = (oo != 0 ? io : 0)) + o (oo != 0 ? oo : io); + o != 0; + o = (oo != 0 && o != io ? io : 0)) { // Adjust action for recipe: on the first iteration we want it // {inner, outer} (which is the same as 'a') while on the second -- cgit v1.1