mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
Fix HLL sparse object creation #2.
Two vars initialized to wrong values in createHLLObject().
This commit is contained in:
parent
b5659cb0a6
commit
f5c03044a6
@ -925,11 +925,11 @@ robj *createHLLObject(void) {
|
|||||||
|
|
||||||
/* Populate the sparse representation with as many XZERO opcodes as
|
/* Populate the sparse representation with as many XZERO opcodes as
|
||||||
* needed to represent all the registers. */
|
* needed to represent all the registers. */
|
||||||
aux = sparselen;
|
aux = HLL_REGISTERS;
|
||||||
s = sdsnewlen(NULL,sparselen);
|
s = sdsnewlen(NULL,sparselen);
|
||||||
p = (uint8_t*)s + HLL_HDR_SIZE;
|
p = (uint8_t*)s + HLL_HDR_SIZE;
|
||||||
while(aux) {
|
while(aux) {
|
||||||
int xzero = HLL_SPARSE_XZERO_MAX_LEN-1;
|
int xzero = HLL_SPARSE_XZERO_MAX_LEN;
|
||||||
if (xzero > aux) xzero = aux;
|
if (xzero > aux) xzero = aux;
|
||||||
HLL_SPARSE_XZERO_SET(p,xzero);
|
HLL_SPARSE_XZERO_SET(p,xzero);
|
||||||
p += 2;
|
p += 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user