From 46f9dd56da7d2af82148c47e40108f3c11ffe4d7 Mon Sep 17 00:00:00 2001 From: Carlo Nucera Date: Thu, 6 Aug 2020 19:30:05 -0400 Subject: [PATCH] Fix bug due to non-deterministic arg eval order --- src/libstore/worker-protocol.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libstore/worker-protocol.hh b/src/libstore/worker-protocol.hh index 60543d626..1e8fd027c 100644 --- a/src/libstore/worker-protocol.hh +++ b/src/libstore/worker-protocol.hh @@ -121,9 +121,9 @@ struct WorkerProto> { std::map resMap; auto size = readNum(from); while (size--) { - resMap.insert_or_assign( - WorkerProto::read(store, from), - WorkerProto::read(store, from)); + auto k = WorkerProto::read(store, from); + auto v = WorkerProto::read(store, from); + resMap.insert_or_assign(std::move(k), std::move(v)); } return resMap; }