diff --git a/lib/fs.js b/lib/fs.js index 972c6edd28..938ffdc81e 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -196,7 +196,7 @@ fs.readSync = function (fd, buffer, offset, length, position) { if (!Buffer.isBuffer(buffer)) { // legacy string interface (fd, length, position, encoding, callback) legacy = true; - encoding = arguments[3]; + var encoding = arguments[3]; position = arguments[2]; length = arguments[1]; buffer = new Buffer(length);