diff options
author | antirez <antirez@gmail.com> | 2014-04-12 23:52:36 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-04-12 23:52:36 +0200 |
commit | 3c3c16561a5e0896109a26a1cb50555dae996868 (patch) | |
tree | 6b0c4fa2fc9adc60c24e74f7fe1094c9233b561a | |
parent | a9e057e095a6ccc38f79fe427c8a7624bbb57a4f (diff) | |
download | redis-3c3c16561a5e0896109a26a1cb50555dae996868.tar.gz |
Fix seqlen computation in hllSparseAdd().
-rw-r--r-- | src/hyperloglog.c | 2 |
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; |