From 53e254c49195705eb2df048a36b92f7009d2cacc Mon Sep 17 00:00:00 2001 From: Chotiwat Chawannakul Date: Tue, 9 Oct 2012 14:45:47 +0700 Subject: [PATCH] Don't reset indata.temp before in data.expect is zero. --- lib/imap.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/imap.js b/lib/imap.js index 64fe8e6..8d454d6 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -205,9 +205,10 @@ ImapConnection.prototype.connect = function(loginCb) { indata.temp += r.toString('binary'); else indata.temp = r.toString('binary'); - if (indata.expect === 0) + if (indata.expect === 0) { indata.literals.push(indata.temp); - indata.temp = undefined; + indata.temp = undefined; + } } if (b.p >= b.length) return;