Fix HLL sparse object creation.

The function didn't considered the fact that each XZERO opcode is
two bytes.
This commit is contained in:
antirez 2014-04-12 10:59:12 +02:00
parent a79386b1af
commit 1ccb661569

View File

@ -913,8 +913,8 @@ robj *createHLLObject(void) {
sds s;
uint8_t *p;
int sparselen = HLL_HDR_SIZE +
((HLL_REGISTERS+(HLL_SPARSE_XZERO_MAX_LEN-1)) /
HLL_SPARSE_XZERO_MAX_LEN);
(((HLL_REGISTERS+(HLL_SPARSE_XZERO_MAX_LEN-1)) /
HLL_SPARSE_XZERO_MAX_LEN)*2);
int aux;
/* Populate the sparse representation with as many XZERO opcodes as