mirror of
https://github.com/fluencelabs/redis
synced 2025-05-02 14:02:14 +00:00
Fix hllSparseAdd() new sequence replacement when next is NULL.
sdsIncrLen() must be called anyway even if we are replacing the last oppcode of the sparse representation.
This commit is contained in:
parent
a3e2adc0ae
commit
f12fb49bb2
@ -784,10 +784,8 @@ int hllSparseAdd(robj *o, unsigned char *ele, size_t elesize) {
|
||||
int deltalen = seqlen-oldlen;
|
||||
|
||||
if (deltalen > 0 && sdslen(o->ptr) > HLL_SPARSE_MAX) goto promote;
|
||||
if (deltalen && next) {
|
||||
memmove(next+deltalen,next,next-sparse);
|
||||
if (deltalen && next) memmove(next+deltalen,next,next-sparse);
|
||||
sdsIncrLen(o->ptr,deltalen);
|
||||
}
|
||||
memcpy(p,seq,seqlen);
|
||||
|
||||
updated:
|
||||
|
Loading…
x
Reference in New Issue
Block a user