Skip to content

Commit

Permalink
fix(Buffer): Update buffer init call (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thexumaker authored Aug 21, 2022
1 parent b6cd231 commit ab790e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var DETECT_LENGTH = 16;

//Determines the appropriate plugin to use for the given file descriptor.
module.exports = function (fd, plugins) {
return pread(fd, new Buffer(DETECT_LENGTH), 0, DETECT_LENGTH, 0)
return pread(fd, Buffer.alloc(DETECT_LENGTH), 0, DETECT_LENGTH, 0)
.spread(function (bytesRead, buffer) {
for (var i = 0; i < plugins.length; i++) {
var plugin = plugins[i];
Expand Down

0 comments on commit ab790e6

Please sign in to comment.