From e423a1761c4181d425875614932bc1a20d8cb518 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 17 Jan 2012 00:25:57 -0700 Subject: [PATCH] [ISSUE #2554] call parseInt on fs.createReadStream's options.start --- lib/fs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 51637c13a64d..492d201de8ef 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -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) { @@ -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;