Skip to content
Permalink
Browse files
Merge pull request #266 from etseidl/patch-1
is CouponHashSet deserialization incorrect?
  • Loading branch information
jmalkin committed Mar 12, 2022
2 parents e6fa052 + 077cc93 commit c3784a5d7f72b89cf6195789dd00381126bb845d
Showing 1 changed file with 1 addition and 2 deletions.
@@ -114,10 +114,9 @@ CouponHashSet<A>* CouponHashSet<A>::newSet(const void* bytes, size_t len, const
} else {
sketch->coupons_.resize(1ULL << lgArrInts);
sketch->couponCount_ = couponCount;
// only need to read valid coupons, unlike in stream case
std::memcpy(sketch->coupons_.data(),
data + hll_constants::HASH_SET_INT_ARR_START,
couponCount * sizeof(uint32_t));
couponsInArray * sizeof(uint32_t));
}

return sketch;

0 comments on commit c3784a5

Please sign in to comment.