Skip to content

Commit

Permalink
Convert intset encoded set before Z*STORE
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern authored and antirez committed May 12, 2011
1 parent a7fa2ba commit 1ffa5d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/t_zset.c
Expand Up @@ -615,6 +615,10 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
if (obj->type == REDIS_ZSET) {
src[i].dict = ((zset*)obj->ptr)->dict;
} else if (obj->type == REDIS_SET) {
if (obj->encoding == REDIS_ENCODING_INTSET)
setTypeConvert(obj, REDIS_ENCODING_HT);

redisAssert(obj->encoding == REDIS_ENCODING_HT);
src[i].dict = (obj->ptr);
} else {
zfree(src);
Expand Down

0 comments on commit 1ffa5d7

Please sign in to comment.