Commit f5c03044 authored by antirez's avatar antirez
Browse files

Fix HLL sparse object creation #2.

Two vars initialized to wrong values in createHLLObject().
parent b5659cb0
...@@ -925,11 +925,11 @@ robj *createHLLObject(void) { ...@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment