summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Smith <aes7mv@virginia.edu>2020-10-16 12:49:33 -0400
committermichael-grunder <michael.grunder@gmail.com>2021-02-25 21:25:17 -0800
commitc8adea4024bbc405d96736c26bd2357c902a1f6b (patch)
tree8a69d6b222655d345fd7b8ac5a70d586509c9d50
parentff73f1f9e79625843c08ab4e4846f21dde36ee93 (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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hiredis.c b/hiredis.c
index 2dadf15..5591cb9 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -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;