From 90f6b221280c7cfa0e1ec842f41a6c2252b5778a Mon Sep 17 00:00:00 2001 From: John Sully Date: Mon, 8 Apr 2019 13:52:02 -0400 Subject: [PATCH] Fix protocol break with hgetall and family Former-commit-id: 42202c868dc24bf5d4a65cd42da2ef38be450a56 --- src/t_hash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_hash.cpp b/src/t_hash.cpp index cfeaaca5d..08933457b 100644 --- a/src/t_hash.cpp +++ b/src/t_hash.cpp @@ -772,7 +772,7 @@ void genericHgetallCommand(client *c, int flags) { hashTypeIterator *hi; int length, count = 0; - if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.null[c->resp])) == NULL + if ((o = lookupKeyReadOrReply(c,c->argv[1],(c->resp < 3) ? shared.emptyarray : shared.null[c->resp])) == NULL || checkType(c,o,OBJ_HASH)) return; /* We return a map if the user requested keys and values, like in the