aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-08-06 19:30:05 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-08-06 19:30:05 -0400
commit46f9dd56da7d2af82148c47e40108f3c11ffe4d7 (patch)
tree7de557090fb59f5dfc646d60d9e1702d2f1e0524 /src
parent9ab07e99f527d1fa3adfa02839da477a1528d64b (diff)
Fix bug due to non-deterministic arg eval order
Diffstat (limited to 'src')
-rw-r--r--src/libstore/worker-protocol.hh6
1 files 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<K, V>> {
std::map<K, V> resMap;
auto size = readNum<size_t>(from);
while (size--) {
- resMap.insert_or_assign(
- WorkerProto<K>::read(store, from),
- WorkerProto<V>::read(store, from));
+ auto k = WorkerProto<K>::read(store, from);
+ auto v = WorkerProto<V>::read(store, from);
+ resMap.insert_or_assign(std::move(k), std::move(v));
}
return resMap;
}