From a97bea2a2ecb1237e6f250ea74099ac2872b3a4d Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Wed, 21 Oct 2020 14:23:45 -0400 Subject: [PATCH] Minor tweak. --- arraycontainer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arraycontainer.go b/arraycontainer.go index 4566e72f..f8bb29b9 100644 --- a/arraycontainer.go +++ b/arraycontainer.go @@ -366,8 +366,8 @@ func (ac *arrayContainer) iorArray(value2 *arrayContainer) container { // the second check is to handle overly large array containers // and should not occur in normal usage, // as all array containers should be at most arrayDefaultMaxSize - if newSize > 8192 && maxPossibleCardinality <= 8192 { - newSize = 8192 + if newSize > 2*arrayDefaultMaxSize && maxPossibleCardinality <= 2*arrayDefaultMaxSize { + newSize = 2 * arrayDefaultMaxSize } newcontent := make([]uint16, 0, newSize) copy(newcontent[len2:maxPossibleCardinality], ac.content[0:len1])