summary refs log tree commit diff stats
path: root/lib/system/channels.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/channels.nim')
-rw-r--r--lib/system/channels.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/channels.nim b/lib/system/channels.nim
index 3c5bda4b1..254b87dfc 100644
--- a/lib/system/channels.nim
+++ b/lib/system/channels.nim
@@ -116,7 +116,7 @@ proc storeAux(dest, src: pointer, mt: PNimType, t: PRawChannel,
       if mode == mStore:
         x[] = alloc0(t.region, seq.len *% mt.base.size +% GenericSeqSize)
       else:
-        unsureAsgnRef(x, newObj(mt, seq.len * mt.base.size + GenericSeqSize))
+        unsureAsgnRef(x, newSeq(mt, seq.len))
       var dst = cast[ByteAddress](cast[PPointer](dest)[])
       var dstseq = cast[PGenericSeq](dst)
       dstseq.len = seq.len