]> git.saurik.com Git - redis.git/commitdiff
protocol fix in SORT reply with null elements
authorantirez <antirez@gmail.com>
Tue, 24 Mar 2009 13:22:42 +0000 (14:22 +0100)
committerantirez <antirez@gmail.com>
Tue, 24 Mar 2009 13:22:42 +0000 (14:22 +0100)
redis.c

diff --git a/redis.c b/redis.c
index 5174b33388d711b147822a530e2798160dc88727..f432825f17b682576fd26916dbd18203e2bb46e4 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -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)));