diff options
author | Alex Smith <aes7mv@virginia.edu> | 2020-10-16 12:49:33 -0400 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2021-02-25 21:25:17 -0800 |
commit | c8adea4024bbc405d96736c26bd2357c902a1f6b (patch) | |
tree | 8a69d6b222655d345fd7b8ac5a70d586509c9d50 | |
parent | ff73f1f9e79625843c08ab4e4846f21dde36ee93 (diff) |
redisReply: Fix parent type assertions during double, nil, bool creation
Per RESP3, push messages are able to contain exactly what array
messages can contain (that is, any other type).
-rw-r--r-- | hiredis.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -243,7 +243,8 @@ static void *createDoubleObject(const redisReadTask *task, double value, char *s parent = task->parent->obj; assert(parent->type == REDIS_REPLY_ARRAY || parent->type == REDIS_REPLY_MAP || - parent->type == REDIS_REPLY_SET); + parent->type == REDIS_REPLY_SET || + parent->type == REDIS_REPLY_PUSH); parent->element[task->idx] = r; } return r; @@ -280,7 +281,8 @@ static void *createBoolObject(const redisReadTask *task, int bval) { parent = task->parent->obj; assert(parent->type == REDIS_REPLY_ARRAY || parent->type == REDIS_REPLY_MAP || - parent->type == REDIS_REPLY_SET); + parent->type == REDIS_REPLY_SET || + parent->type == REDIS_REPLY_PUSH); parent->element[task->idx] = r; } return r; |