提交 b9643808 编写于 作者: A antirez

Fix seqlen computation in hllSparseAdd().

上级 1c6671ab
...@@ -779,7 +779,7 @@ int hllSparseAdd(robj *o, unsigned char *ele, size_t elesize) { ...@@ -779,7 +779,7 @@ int hllSparseAdd(robj *o, unsigned char *ele, size_t elesize) {
* *
* Note that we already allocated space on the sds string * Note that we already allocated space on the sds string
* calling sdsMakeRoomFor(). */ * calling sdsMakeRoomFor(). */
int seqlen = seq-n; int seqlen = n-seq;
int oldlen = is_xzero ? 2 : 1; int oldlen = is_xzero ? 2 : 1;
int deltalen = seqlen-oldlen; int deltalen = seqlen-oldlen;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册