RESP3: hiredis: fix hiredis.c assert for new types.
This commit is contained in:
parent
d4a4375d05
commit
24a05e39f0
8
deps/hiredis/hiredis.c
vendored
8
deps/hiredis/hiredis.c
vendored
@ -152,7 +152,9 @@ static void *createArrayObject(const redisReadTask *task, int elements) {
|
|||||||
|
|
||||||
if (task->parent) {
|
if (task->parent) {
|
||||||
parent = task->parent->obj;
|
parent = task->parent->obj;
|
||||||
assert(parent->type == REDIS_REPLY_ARRAY);
|
assert(parent->type == REDIS_REPLY_ARRAY ||
|
||||||
|
parent->type == REDIS_REPLY_MAP ||
|
||||||
|
parent->type == REDIS_REPLY_SET);
|
||||||
parent->element[task->idx] = r;
|
parent->element[task->idx] = r;
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
@ -169,7 +171,9 @@ static void *createIntegerObject(const redisReadTask *task, long long value) {
|
|||||||
|
|
||||||
if (task->parent) {
|
if (task->parent) {
|
||||||
parent = task->parent->obj;
|
parent = task->parent->obj;
|
||||||
assert(parent->type == REDIS_REPLY_ARRAY);
|
assert(parent->type == REDIS_REPLY_ARRAY ||
|
||||||
|
parent->type == REDIS_REPLY_MAP ||
|
||||||
|
parent->type == REDIS_REPLY_SET);
|
||||||
parent->element[task->idx] = r;
|
parent->element[task->idx] = r;
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user