Aggregate protocol length going up the stack

This commit is contained in:
Pieter Noordhuis 2011-06-30 17:08:16 +02:00
parent 624ba36502
commit e7d8b0c78a

View File

@ -316,6 +316,12 @@ size_t redis_parser_execute(redis_parser_t *parser, redis_protocol_t **dst, cons
cur->remaining--;
break;
}
/* Aggregate plen for nested objects */
if (stackidx > 0) {
stack[stackidx-1].plen += cur->plen;
}
stackidx--;
}