Commit 70fe4177 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Increment array cursor after completing nested object

parent dfc0c796
......@@ -456,13 +456,14 @@ size_t redis_parser_execute(redis_parser *parser, redis_protocol **dst, const ch
/* Move to nested object when we see an incomplete array */
if (cur->type == REDIS_ARRAY && (cur->cursor < cur->size)) {
RESET_PROTOCOL(&stack[++stackidx]);
cur->cursor++;
break;
}
/* Aggregate plen for nested objects */
if (stackidx > 0) {
assert(stack[stackidx-1].type == REDIS_ARRAY);
stack[stackidx-1].plen += cur->plen;
stack[stackidx-1].cursor++;
}
cur = &stack[--stackidx];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment