fixed getNextLine #58

Merged
bubbleboy14 merged 1 commit from master into master 2013-08-02 01:39:42 -07:00

View file

@ -434,7 +434,7 @@ exports.LineReader.prototype = {
getNextLine: function() {
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);
return result;