Skip to content

Commit

Permalink
hopefully fix crash in constraints (microsoft#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
strega-nil authored Apr 15, 2021
1 parent 75dc1fe commit 80cf422
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/vcpkg/dependencies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,18 @@ namespace vcpkg::Dependencies
}

auto& dep_node = emplace_package(dep_spec);
add_constraint(dep_node, dep, ref.first.name());
if (dep_spec == ref.first)
{
// this is a feature dependency for oneself
for (auto&& f : dep.features)
{
add_constraint(ref, f, ref.first.name());
}
}
else
{
add_constraint(dep_node, dep, ref.first.name());
}

p.first->second.emplace_back(dep_spec, "core");
for (auto&& f : dep.features)
Expand Down

0 comments on commit 80cf422

Please sign in to comment.