From 2ce3b7f82b6f7a3a5ee550e2b5f5b15653738bd1 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Thu, 24 May 2012 00:09:20 -0300 Subject: [PATCH] b2/bom.c (bom_subst): include input variables in the part's list of variables --- b2/bom.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/b2/bom.c b/b2/bom.c index 89cb31a..0da4a10 100644 --- a/b2/bom.c +++ b/b2/bom.c @@ -146,11 +146,13 @@ int bom_subst(struct bom *b, const struct subst *sub) /* run substitutions */ res = substitute(sub, vars, &out); - free_vars(vars); - if (res) - b->vars = out; - else + if (res) { + b->vars = merge_vars(vars, out); + free_vars(out); + } else { n_bom--; + } + free_vars(vars); return res; }