From 27cda6e844baf3cff1fb077adef8b99430467178 Mon Sep 17 00:00:00 2001 From: Sara Dolores Tasche Date: Wed, 24 Mar 2021 14:27:15 +0000 Subject: [PATCH] Issue #4 Signed-off-by: Sara Dolores Tasche --- PackedArray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PackedArray.c b/PackedArray.c index b8ea36f..74ba4fd 100644 --- a/PackedArray.c +++ b/PackedArray.c @@ -239,7 +239,7 @@ void PACKEDARRAY_JOIN(__PackedArray_pack_, PACKEDARRAY_IMPL_BITS_PER_ITEM)(uint3 PACKEDARRAY_ASSERT(in == end); if ((count * PACKEDARRAY_IMPL_BITS_PER_ITEM + startBit) % 32) { - packed |= *out & ~((uint32_t)(1ULL << ((((uint64_t)count * (uint64_t)PACKEDARRAY_IMPL_BITS_PER_ITEM + startBit - 1) % 32) + 1)) - 1); + packed |= *out & ~((uint32_t)(1ULL << (((uint64_t)count * (uint64_t)PACKEDARRAY_IMPL_BITS_PER_ITEM + startBit) % 32)) - 1); *out = packed; } }