Skip to content

Commit

Permalink
Merge pull request #258 from Congelli501/patch-1
Browse files Browse the repository at this point in the history
Fix: bad buffer.alloc for .toBuffer in async mode
  • Loading branch information
cthackers authored Oct 11, 2018
2 parents aec5998 + 1bd2ae5 commit 5e4c8ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zipFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ module.exports = function (/*String|Buffer*/input, /*Number*/inputType) {
entry.header.offset = dindex;
// data header
var dataHeader = entry.header.dataHeaderToBinary();
var postHeader = Buffer.alloc(name);
var postHeader = Buffer.from(name);
var dataLength = dataHeader.length + postHeader.length + compressedData.length;

dindex += dataLength;
Expand Down

0 comments on commit 5e4c8ad

Please sign in to comment.