diff options
Diffstat (limited to 'src/libexpr/common-opts.cc')
-rw-r--r-- | src/libexpr/common-opts.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libexpr/common-opts.cc b/src/libexpr/common-opts.cc index 9131951e315d..6b393c07df50 100644 --- a/src/libexpr/common-opts.cc +++ b/src/libexpr/common-opts.cc @@ -20,12 +20,13 @@ bool parseOptionArg(const string & arg, Strings::iterator & i, if (i == argsEnd) throw error; string value = *i++; - Value & v(autoArgs[state.symbols.create(name)].value); + Value * v = state.allocValue(); + autoArgs[state.symbols.create(name)].value = v; if (arg == "--arg") - state.mkThunk_(v, parseExprFromString(state, value, absPath("."))); + state.mkThunk_(*v, parseExprFromString(state, value, absPath("."))); else - mkString(v, value); + mkString(*v, value); return true; } |