1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Fix parsing mb nil in nested multi-bulk reply.

This commit is contained in:
Matt Ranney
2010-09-23 12:21:52 -07:00
parent c1225b9b86
commit 6e64d81800

View File

@@ -253,7 +253,8 @@ RedisReplyParser.prototype.send_reply = function (reply) {
RedisReplyParser.prototype.add_multi_bulk_reply = function (reply) {
if (this.multi_bulk_replies) {
this.multi_bulk_replies.push(reply);
if (this.multi_bulk_replies.length !== this.multi_bulk_length) {
// use "less than" here because a nil mb reply claims "0 length", but we need 1 slot to hold it
if (this.multi_bulk_replies.length < this.multi_bulk_length) {
return;
}
} else {