diff options
author | antirez <antirez@gmail.com> | 2018-12-03 18:08:00 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-12-21 11:42:51 +0100 |
commit | 9412818797f67ab173090b254bd4cb025d96dbeb (patch) | |
tree | c8f9383bf01503e20923b07563d9d5e41aff1bef | |
parent | 6dedbcaa4aa4826f2d64f38a575656093006c029 (diff) | |
download | redis-9412818797f67ab173090b254bd4cb025d96dbeb.tar.gz |
RESP3: fix genericHgetallCommand() assert.
-rw-r--r-- | src/t_hash.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/t_hash.c b/src/t_hash.c index a50da5796..70a7b2f47 100644 --- a/src/t_hash.c +++ b/src/t_hash.c @@ -793,6 +793,9 @@ void genericHgetallCommand(client *c, int flags) { } hashTypeReleaseIterator(hi); + + /* Make sure we returned the right number of elements. */ + if (flags & OBJ_HASH_KEY && flags & OBJ_HASH_VALUE) count /= 2; serverAssert(count == length); } |