aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/variable.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/variable.cxx')
-rw-r--r--libbuild2/variable.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbuild2/variable.cxx b/libbuild2/variable.cxx
index d84945f..0cf6528 100644
--- a/libbuild2/variable.cxx
+++ b/libbuild2/variable.cxx
@@ -1721,7 +1721,7 @@ namespace build2
const variable_map empty_variable_map (nullptr /* context */);
auto variable_map::
- lookup (const variable& var, bool typed) const ->
+ lookup (const variable& var, bool typed, bool aliased) const ->
pair<const value_data*, const variable&>
{
const variable* v (&var);
@@ -1739,7 +1739,8 @@ namespace build2
break;
}
- v = v->aliases;
+ if (aliased)
+ v = v->aliases;
} while (v != &var && v != nullptr);