From d030838df4f5bd2dbb94ea4adc0261d21f7f6eee Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 18 Aug 2021 11:51:31 +0200 Subject: Fix bug in external module skipping logic --- libbuild2/module.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'libbuild2/module.cxx') diff --git a/libbuild2/module.cxx b/libbuild2/module.cxx index b31aa9c..9756860 100644 --- a/libbuild2/module.cxx +++ b/libbuild2/module.cxx @@ -591,17 +591,15 @@ namespace build2 << mmod; } else - { - // Reduce skipped external module to optional. - // - if (boot) - opt = true; - i = loaded_modules.emplace (move (mmod), nullptr).first; - } } } + // Reduce skipped external module to optional. + // + if (boot && i->second == nullptr) + opt = true; + // Now the iterator points to a submodule or to the main module, the // latter potentially NULL. // -- cgit v1.1