diff options
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index af2bf92e3fe9..050991a1bfac 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -319,9 +319,9 @@ inline Value * EvalState::lookupVar(Env * env, const VarRef & var, bool noEval) while (1) { if (!env->haveWithAttrs) { if (noEval) return 0; - Expr * attrs = (Expr *) env->values[0]; - env->values[0] = allocValue(); - evalAttrs(*env->up, attrs, *env->values[0]); + Value * v = allocValue(); + evalAttrs(*env->up, (Expr *) env->values[0], *v); + env->values[0] = v; env->haveWithAttrs = true; } Bindings::iterator j = env->values[0]->attrs->find(var.name); |