mirror of
https://github.com/fluencelabs/redis
synced 2025-04-01 23:31:03 +00:00
RESP3: hiredis: fix read.c assert for new types.
This commit is contained in:
parent
d5c54f0b3a
commit
eb3c5a70d4
4
deps/hiredis/hiredis.c
vendored
4
deps/hiredis/hiredis.c
vendored
@ -123,7 +123,9 @@ static void *createStringObject(const redisReadTask *task, char *str, size_t len
|
|||||||
|
|
||||||
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;
|
||||||
|
4
deps/hiredis/read.c
vendored
4
deps/hiredis/read.c
vendored
@ -243,7 +243,9 @@ static void moveToNextTask(redisReader *r) {
|
|||||||
|
|
||||||
cur = &(r->rstack[r->ridx]);
|
cur = &(r->rstack[r->ridx]);
|
||||||
prv = &(r->rstack[r->ridx-1]);
|
prv = &(r->rstack[r->ridx-1]);
|
||||||
assert(prv->type == REDIS_REPLY_ARRAY);
|
assert(prv->type == REDIS_REPLY_ARRAY ||
|
||||||
|
prv->type == REDIS_REPLY_MAP ||
|
||||||
|
prv->type == REDIS_REPLY_SET);
|
||||||
if (cur->idx == prv->elements-1) {
|
if (cur->idx == prv->elements-1) {
|
||||||
r->ridx--;
|
r->ridx--;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user