diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-08-10 13:40:27 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-08-10 13:40:27 +0200 |
commit | 9d8ba565d1fd454369506a525997fceb5adae349 (patch) | |
tree | da10d155660ff59cfd82ee7bb45d4503e26c198d /libbuild2/algorithm.cxx | |
parent | 600da2b97e937b9c96791c291cb5e08cd8526bdd (diff) |
Allow holes in group_view array
Diffstat (limited to 'libbuild2/algorithm.cxx')
-rw-r--r-- | libbuild2/algorithm.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libbuild2/algorithm.cxx b/libbuild2/algorithm.cxx index e1f30e0..75540ff 100644 --- a/libbuild2/algorithm.cxx +++ b/libbuild2/algorithm.cxx @@ -2390,8 +2390,16 @@ namespace build2 group_view gv (g.group_members (a)); if (gv.count != 0) { - ep = gv.members[0]->as<file> ().path () + ".d"; + for (size_t i (0); i != gv.count; ++i) + { + if (const target* m = gv.members[i]) + { + ep = m->as<file> ().path () + ".d"; + break; + } + } + assert (!ep.empty ()); if (rmfile (ctx, ep, 3)) er = target_state::changed; } |