Commit 2d1e35a5 authored by antirez's avatar antirez
Browse files

hllSparseAdd() opcode seek stop condition fixed.

parent 29c7d197
...@@ -668,7 +668,7 @@ int hllSparseAdd(robj *o, unsigned char *ele, size_t elesize) { ...@@ -668,7 +668,7 @@ int hllSparseAdd(robj *o, unsigned char *ele, size_t elesize) {
else if (HLL_SPARSE_IS_XZERO(p)) span = HLL_SPARSE_XZERO_LEN(p); else if (HLL_SPARSE_IS_XZERO(p)) span = HLL_SPARSE_XZERO_LEN(p);
else span = HLL_SPARSE_VAL_LEN(p); else span = HLL_SPARSE_VAL_LEN(p);
/* Break if this opcode covers the register as 'index'. */ /* Break if this opcode covers the register as 'index'. */
if (first+span >= index) break; if (index <= first+span-1) break;
prev = p; prev = p;
p += (HLL_SPARSE_IS_XZERO(p)) ? 2 : 1; p += (HLL_SPARSE_IS_XZERO(p)) ? 2 : 1;
first += span; first += span;
......
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