From 5fa4376b5f9a4672a90f841e9e7f234be3798c40 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Sun, 5 Mar 2017 18:07:26 +1100 Subject: [PATCH] README: slice should account for len given (#45) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad7fb56..c2de628 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ fuse.mount('./mnt', { }, read: function (path, fd, buf, len, pos, cb) { console.log('read(%s, %d, %d, %d)', path, fd, len, pos) - var str = 'hello world\n'.slice(pos) + var str = 'hello world\n'.slice(pos, pos + len) if (!str) return cb(0) buf.write(str) return cb(str.length)