diff options
author | antirez <antirez@gmail.com> | 2018-12-03 18:08:00 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-01-09 17:00:29 +0100 |
commit | 0652b05caf32ea6ff5d9aeb17607f35446df55c4 (patch) | |
tree | 8a755a4e7b8421b8d2bf7f12d025a4b05a2047e9 /src/t_hash.c | |
parent | c2e5be04214acea0bb93f21155333853ab73641a (diff) | |
download | redis-0652b05caf32ea6ff5d9aeb17607f35446df55c4.tar.gz |
RESP3: fix genericHgetallCommand() assert.
Diffstat (limited to 'src/t_hash.c')
-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); } |