summaryrefslogtreecommitdiff
path: root/src/db.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.c')
-rw-r--r--src/db.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/db.c b/src/db.c
index a560ce052..5ebd21e4b 100644
--- a/src/db.c
+++ b/src/db.c
@@ -915,14 +915,16 @@ void scanGenericCommand(client *c, robj *o, unsigned long cursor) {
} while (cursor &&
maxiterations-- &&
listLength(keys) < (unsigned long)count);
- } else if (o->type == OBJ_SET) {
+ } else if (o->type == OBJ_SET && o->encoding == OBJ_ENCODING_INTSET) {
int pos = 0;
int64_t ll;
while(intsetGet(o->ptr,pos++,&ll))
listAddNodeTail(keys,createStringObjectFromLongLong(ll));
cursor = 0;
- } else if (o->type == OBJ_HASH || o->type == OBJ_ZSET) {
+ } else if ((o->type == OBJ_HASH || o->type == OBJ_ZSET || o->type == OBJ_SET) &&
+ o->encoding == OBJ_ENCODING_LISTPACK)
+ {
unsigned char *p = lpFirst(o->ptr);
unsigned char *vstr;
int64_t vlen;