protocol fix in SORT reply with null elements

This commit is contained in:
antirez 2009-03-24 14:22:42 +01:00
parent fab3a740ab
commit 9eb00f21f0

View File

@ -2772,7 +2772,7 @@ static void sortCommand(redisClient *c) {
if (sop->type == REDIS_SORT_GET) {
if (!val || val->type != REDIS_STRING) {
addReply(c,shared.minus1);
addReply(c,shared.nullbulk);
} else {
addReplySds(c,sdscatprintf(sdsempty(),"$%d\r\n",
sdslen(val->ptr)));