diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/eval.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index f94c23ea7..37b977736 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -1316,7 +1316,8 @@ void EvalState::concatLists(Value & v, unsigned int nrLists, Value * * lists, co auto out = v.listElems(); for (unsigned int n = 0, pos = 0; n < nrLists; ++n) { unsigned int l = lists[n]->listSize(); - memcpy(out + pos, lists[n]->listElems(), l * sizeof(Value *)); + if (l) + memcpy(out + pos, lists[n]->listElems(), l * sizeof(Value *)); pos += l; } } |