X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/cea8c5cd75b88cd5a13d9b253d792cc045d28b62..40531be0e338556df5510f49f4472ea50713962f:/src/sort.c diff --git a/src/sort.c b/src/sort.c index 1cf8932e..ff275c95 100644 --- a/src/sort.c +++ b/src/sort.c @@ -199,6 +199,9 @@ void sortCommand(redisClient *c) { j++; } + /* Destructively convert encoded sorted sets for SORT. */ + if (sortval->type == REDIS_ZSET) zsetConvert(sortval, REDIS_ENCODING_SKIPLIST); + /* Load the sorting vector with all the objects to sort */ switch(sortval->type) { case REDIS_LIST: vectorlen = listTypeLength(sortval); break;