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:
Alex Smith 2020-10-16 12:49:33 -04:00 committed by michael-grunder
parent ff73f1f9e7
commit c8adea4024

View File

@ -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;