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).
This commit is contained in:
parent
ff73f1f9e7
commit
c8adea4024
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user