read error with empty buffer?

20 views
Skip to first unread message

Mark Hahn

unread,
Jul 27, 2014, 12:32:48 PM7/27/14
to nodejs
Why does this throw an exception?  fd is valid.  The file is larger than 6 bytes, although even that shouldn't be a problem.  This works with non-empty buffers and other more normal values.

    buf = new Buffer(0);
    fs.readSync(fd, buf , 0, 0, 6);

Reply all
Reply to author
Forward
0 new messages