summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hyperloglog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hyperloglog.c b/src/hyperloglog.c
index 8e0cba7ae..119cbab1c 100644
--- a/src/hyperloglog.c
+++ b/src/hyperloglog.c
@@ -779,7 +779,7 @@ int hllSparseAdd(robj *o, unsigned char *ele, size_t elesize) {
*
* Note that we already allocated space on the sds string
* calling sdsMakeRoomFor(). */
- int seqlen = seq-n;
+ int seqlen = n-seq;
int oldlen = is_xzero ? 2 : 1;
int deltalen = seqlen-oldlen;