Skip to content

Commit

Permalink
[ISSUE nodejs#2554] call parseInt on fs.createReadStream's options.start
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ ONeal committed Jan 17, 2012
1 parent 6e76a7c commit e423a17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ var ReadStream = fs.ReadStream = function(path, options) {
throw new Error('start must be <= end');
}

this.pos = this.start;
this.pos = parseInt(this.start, 10);
}

if (this.fd !== null) {
Expand Down Expand Up @@ -1268,7 +1268,7 @@ var WriteStream = fs.WriteStream = function(path, options) {
throw new Error('start must be >= zero');
}

this.pos = this.start;
this.pos = parseInt(this.start, 10);
}

this.busy = false;
Expand Down

0 comments on commit e423a17

Please sign in to comment.