summaryrefslogtreecommitdiff
path: root/deps/hiredis
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-12-05 11:55:29 +0100
committerantirez <antirez@gmail.com>2019-01-09 17:00:29 +0100
commiteb3c5a70d48f83c3222553fb0bf8c2c61395e886 (patch)
tree34eb55c1d1c442650b2c223bf2753e515b369f9b /deps/hiredis
parentd5c54f0b3a908595afead2cbcd93555f2886f22f (diff)
downloadredis-eb3c5a70d48f83c3222553fb0bf8c2c61395e886.tar.gz
RESP3: hiredis: fix read.c assert for new types.
Diffstat (limited to 'deps/hiredis')
-rw-r--r--deps/hiredis/hiredis.c4
-rw-r--r--deps/hiredis/read.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/deps/hiredis/hiredis.c b/deps/hiredis/hiredis.c
index bfbf483e1..0de477c3e 100644
--- a/deps/hiredis/hiredis.c
+++ b/deps/hiredis/hiredis.c
@@ -123,7 +123,9 @@ static void *createStringObject(const redisReadTask *task, char *str, size_t len
if (task->parent) {
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;
}
return r;
diff --git a/deps/hiredis/read.c b/deps/hiredis/read.c
index 084d0b078..221438883 100644
--- a/deps/hiredis/read.c
+++ b/deps/hiredis/read.c
@@ -243,7 +243,9 @@ static void moveToNextTask(redisReader *r) {
cur = &(r->rstack[r->ridx]);
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) {
r->ridx--;
} else {