fixed getNextLine
This commit is contained in:
parent
31cf44b999
commit
be1e0e24ff
1 changed files with 1 additions and 1 deletions
|
|
@ -434,7 +434,7 @@ exports.LineReader.prototype = {
|
||||||
|
|
||||||
getNextLine: function() {
|
getNextLine: function() {
|
||||||
var lineEnd = this.buffer.indexOf("\n"),
|
var lineEnd = this.buffer.indexOf("\n"),
|
||||||
result = this.buffer.substring(0, lineEnd ? lineEnd : this.buffer.length);
|
result = this.buffer.substring(0, lineEnd != -1 ? lineEnd : this.buffer.length);
|
||||||
|
|
||||||
this.buffer = this.buffer.substring(result.length + 1, this.buffer.length);
|
this.buffer = this.buffer.substring(result.length + 1, this.buffer.length);
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
Reference in a new issue