about summary refs log tree commit diff
path: root/src/libexpr
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/nixexpr.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc
index dd0f5d58af27..7de3e823c4f4 100644
--- a/src/libexpr/nixexpr.cc
+++ b/src/libexpr/nixexpr.cc
@@ -4,6 +4,7 @@
 
 ATermMap::ATermMap(unsigned int initialSize, unsigned int maxLoadPct)
 {
+    this->maxLoadPct = maxLoadPct;
     table = ATtableCreate(initialSize, maxLoadPct);
     if (!table) throw Error("cannot create ATerm table");
 }
@@ -15,7 +16,8 @@ ATermMap::ATermMap(const ATermMap & map)
     ATermList keys = map.keys();
 
     /* !!! adjust allocation for load pct */
-    table = ATtableCreate(ATgetLength(keys), map.maxLoadPct);
+    maxLoadPct = map.maxLoadPct;
+    table = ATtableCreate(ATgetLength(keys), maxLoadPct);
     if (!table) throw Error("cannot create ATerm table");
 
     for (ATermIterator i(keys); i; ++i)