From 76c59f0e44737b0046eeba02d849cf7e20dab3a7 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 14 Mar 2019 17:52:02 +0100 Subject: [PATCH] Fix ZPOP return type when COUNT=0. Related to #5799. --- src/t_zset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_zset.c b/src/t_zset.c index 9f74d39c..09955150 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -3145,7 +3145,7 @@ void genericZpopCommand(client *c, robj **keyv, int keyc, int where, int emitkey if (getLongFromObjectOrReply(c,countarg,&count,NULL) != C_OK) return; if (count <= 0) { - addReplyNullArray(c); + addReply(c,shared.emptymultibulk); return; } }