diff --git a/src/hyperloglog.c b/src/hyperloglog.c index 1c6ed45f..ecc061c2 100644 --- a/src/hyperloglog.c +++ b/src/hyperloglog.c @@ -188,8 +188,8 @@ struct hllhdr { }; /* The cached cardinality MSB is used to signal validity of the cached value. */ -#define HLL_INVALIDATE_CACHE(hdr) (hdr)->card[0] |= (1<<7) -#define HLL_VALID_CACHE(hdr) (((hdr)->card[0] & (1<<7)) == 0) +#define HLL_INVALIDATE_CACHE(hdr) (hdr)->card[7] |= (1<<7) +#define HLL_VALID_CACHE(hdr) (((hdr)->card[7] & (1<<7)) == 0) #define HLL_P 14 /* The greater is P, the smaller the error. */ #define HLL_REGISTERS (1<