Parser: fix bug where entire chunk was being buffered instead of from current position onward

fork
mscdex 11 years ago
parent bf4c8ca7bf
commit 92db64096f

@ -97,7 +97,7 @@ Parser.prototype._parse = function(data) {
while (i < datalen) {
idxlf = indexOfCh(data, datalen, i, CH_LF);
if (idxlf === -1) {
this._buffer += data.toString('utf8');
this._buffer += data.toString('utf8', i);
break;
} else {
this._buffer += data.toString('utf8', i, idxlf);

Loading…
Cancel
Save